From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Alexey Klimov <klimov.linux@gmail.com>
Cc: linux-leds@vger.kernel.org,
Linux Media <linux-media@vger.kernel.org>,
devicetree@vger.kernel.org,
Kyungmin Park <kyungmin.park@samsung.com>,
pavel@ucw.cz, cooloney@gmail.com, rpurdie@rpsys.net,
sakari.ailus@iki.fi, Sylwester Nawrocki <s.nawrocki@samsung.com>,
Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCH v9 2/8] media: Add registration helpers for V4L2 flash sub-devices
Date: Fri, 19 Jun 2015 08:27:17 +0200 [thread overview]
Message-ID: <5583B645.601@samsung.com> (raw)
In-Reply-To: <CALW4P+JBbBZa4rQcMtxhWGD+cEa7yHE_pWazxpDaK25xf08N4Q@mail.gmail.com>
Hi Alexey,
On 06/18/2015 07:45 PM, Alexey Klimov wrote:
> Hi Jacek,
>
> On Mon, May 25, 2015 at 6:13 PM, Jacek Anaszewski
> <j.anaszewski@samsung.com> wrote:
>> This patch adds helper functions for registering/unregistering
>> LED Flash class devices as V4L2 sub-devices. The functions should
>> be called from the LED subsystem device driver. In case the
>> support for V4L2 Flash sub-devices is disabled in the kernel
>> config the functions' empty versions will be used.
>>
>> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
>> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
>> Cc: Sakari Ailus <sakari.ailus@iki.fi>
>> Cc: Hans Verkuil <hans.verkuil@cisco.com>
>> ---
>> drivers/media/v4l2-core/Kconfig | 11 +
>> drivers/media/v4l2-core/Makefile | 2 +
>> drivers/media/v4l2-core/v4l2-flash-led-class.c | 671 ++++++++++++++++++++++++
>> include/media/v4l2-flash-led-class.h | 148 ++++++
>> 4 files changed, 832 insertions(+)
>> create mode 100644 drivers/media/v4l2-core/v4l2-flash-led-class.c
>> create mode 100644 include/media/v4l2-flash-led-class.h
[...]
>> +struct v4l2_flash *v4l2_flash_init(
>> + struct device *dev, struct device_node *of_node,
>> + struct led_classdev_flash *fled_cdev,
>> + struct led_classdev_flash *iled_cdev,
>> + const struct v4l2_flash_ops *ops,
>> + struct v4l2_flash_config *config)
>> +{
>> + struct v4l2_flash *v4l2_flash;
>
>> + struct led_classdev *led_cdev = &fled_cdev->led_cdev;
>> + struct v4l2_subdev *sd;
>> + int ret;
>> +
>> + if (!fled_cdev || !ops || !config)
>> + return ERR_PTR(-EINVAL);
>
> Could you please if it is correct? You're checking fled_cdev but four
> lines above you're using fled_cdev and taking led_cdev pointer from
> there. Maybe it's better to move calculation of led_cdev down and
> place after if-check?
Thanks for spotting this. I'll submit fixed version soon.
--
Best Regards,
Jacek Anaszewski
next prev parent reply other threads:[~2015-06-19 6:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-25 15:13 [PATCH v9 0/8] LED / flash API integration Jacek Anaszewski
2015-05-25 15:13 ` [PATCH v9 1/8] Documentation: leds: Add description of v4l2-flash sub-device Jacek Anaszewski
2015-06-01 20:58 ` Sakari Ailus
2015-05-25 15:13 ` [PATCH v9 2/8] media: Add registration helpers for V4L2 flash sub-devices Jacek Anaszewski
2015-06-01 20:59 ` Sakari Ailus
2015-06-02 9:13 ` Jacek Anaszewski
[not found] ` <556D73D2.20600-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-06-02 15:32 ` Sakari Ailus
2015-06-02 15:32 ` Sakari Ailus
2015-06-03 7:56 ` Jacek Anaszewski
[not found] ` <556EB337.4010608-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-06-03 20:59 ` Sakari Ailus
2015-06-03 20:59 ` Sakari Ailus
2015-06-08 7:21 ` Jacek Anaszewski
2015-06-08 7:37 ` Sakari Ailus
2015-06-08 7:43 ` Jacek Anaszewski
[not found] ` <1432566843-6391-3-git-send-email-j.anaszewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-06-18 17:45 ` Alexey Klimov
2015-06-18 17:45 ` Alexey Klimov
2015-06-19 6:27 ` Jacek Anaszewski [this message]
2015-05-25 15:13 ` [PATCH v9 3/8] leds: max77693: add support for V4L2 Flash sub-device Jacek Anaszewski
2015-06-01 21:21 ` Sakari Ailus
2015-05-25 15:13 ` [PATCH v9 4/8] DT: aat1290: Document handling external strobe sources Jacek Anaszewski
2015-05-25 15:14 ` [PATCH v9 5/8] leds: aat1290: add support for V4L2 Flash sub-device Jacek Anaszewski
2015-05-25 15:14 ` [PATCH v9 6/8] exynos4-is: Improve the mechanism of async subdevs verification Jacek Anaszewski
2015-05-25 15:14 ` [PATCH v9 7/8] DT: Add documentation for exynos4-is 'flashes' property Jacek Anaszewski
2015-05-25 15:14 ` [PATCH v9 8/8] exynos4-is: Add support for v4l2-flash subdevs Jacek Anaszewski
2015-05-26 9:04 ` Sylwester Nawrocki
2015-05-26 9:28 ` Jacek Anaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5583B645.601@samsung.com \
--to=j.anaszewski@samsung.com \
--cc=cooloney@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=hans.verkuil@cisco.com \
--cc=klimov.linux@gmail.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-leds@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rpurdie@rpsys.net \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.