linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Jacek Anaszewski <j.anaszewski@samsung.com>,
	linux-leds@vger.kernel.org, linux-media@vger.kernel.org
Cc: pavel@ucw.cz, cooloney@gmail.com, rpurdie@rpsys.net,
	sakari.ailus@iki.fi, s.nawrocki@samsung.com,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCH v10.1] media: Add registration helpers for V4L2 flash sub-devices
Date: Tue, 28 Jul 2015 12:00:00 +0200	[thread overview]
Message-ID: <55B752A0.9060301@xs4all.nl> (raw)
In-Reply-To: <1434699107-5678-1-git-send-email-j.anaszewski@samsung.com>

On 06/19/2015 09:31 AM, Jacek Anaszewski 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>
> ---
> - fixed possible NULL fled_cdev pointer dereference
>   in the v4l2_flash_init function
> 
>  drivers/media/v4l2-core/Kconfig                |   11 +
>  drivers/media/v4l2-core/Makefile               |    2 +
>  drivers/media/v4l2-core/v4l2-flash-led-class.c |  710 ++++++++++++++++++++++++
>  include/media/v4l2-flash-led-class.h           |  148 +++++
>  4 files changed, 871 insertions(+)
>  create mode 100644 drivers/media/v4l2-core/v4l2-flash-led-class.c
>  create mode 100644 include/media/v4l2-flash-led-class.h
> 

<snip>

> diff --git a/drivers/media/v4l2-core/v4l2-flash-led-class.c b/drivers/media/v4l2-core/v4l2-flash-led-class.c
> new file mode 100644
> index 0000000..5bdfb8d
> --- /dev/null
> +++ b/drivers/media/v4l2-core/v4l2-flash-led-class.c

<snip>

> +static const struct v4l2_subdev_core_ops v4l2_flash_core_ops = {
> +	.queryctrl = v4l2_subdev_queryctrl,
> +	.querymenu = v4l2_subdev_querymenu,

Why are these here? This should not be necessary. As long as the sd.ctrl_handler
pointer is set, this is handled automatically.

> +};
> +
> +static const struct v4l2_subdev_ops v4l2_flash_subdev_ops = {
> +	.core = &v4l2_flash_core_ops,
> +};
> +

And if v4l2_flash_core_ops goes away, then this can go away as well.

I know this driver has been merged, but I just noticed this while looking at
something else.

Regards,

	Hans

  parent reply	other threads:[~2015-07-28 10:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19  7:31 [PATCH v10.1] media: Add registration helpers for V4L2 flash sub-devices Jacek Anaszewski
2015-06-22 20:54 ` Bryan Wu
2015-06-24 11:42 ` Sakari Ailus
2015-07-28 10:00 ` Hans Verkuil [this message]
2015-07-28 11:33   ` Jacek Anaszewski
2015-08-11 12:56   ` Jacek Anaszewski
2015-08-11 12:57     ` Hans Verkuil

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=55B752A0.9060301@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=cooloney@gmail.com \
    --cc=hans.verkuil@cisco.com \
    --cc=j.anaszewski@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).