All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [RFC v1.1 2/2] media: v4l: Only get module if it's different than the driver for v4l2_dev
Date: Fri, 10 Jan 2014 11:08:28 +0200	[thread overview]
Message-ID: <52CFB88C.4030109@linux.intel.com> (raw)
In-Reply-To: <1814672.r475G5dY7x@avalon>

Hi Laurent,

Laurent Pinchart wrote:
> Hi Sakari,
>
> Thank you for the patch.
>
> On Tuesday 17 December 2013 15:49:24 Sakari Ailus wrote:
>> When the sub-device is registered, increment the use count of the sub-device
>> owner only if it's different from the owner of the driver for the media
>> device. This avoids increasing the use count by the module itself and thus
>> making it possible to unload it when it's not in use.
>>
>> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>
> This looks good to me, but I wonder whether a more generic solution won't be
> needed, to solve the multiple circular reference issues we (will) have with
> subdevices and clocks. My gut feeling is that such a generic solution will
> also cater for the needs of the problem you're trying to solve here.

I can't immediately think of solving this in a generic fashion. There 
are dependencies to API behaviour for instance. For clocks this could be 
resolved by changing how clk_get() is used by sensor drivers, or 
changing the clock framework to allow unregistering clocks even if they 
have been obtained by the users but not enabled. Considering the current 
implementation of clk_unregister(), the need for (some) changes is 
apparent. (I could miss some changes elsewhere as I just checked 
linux-media.)

The above would still resolve this for clocks alone.

> This being said, there's no reason to delay this patch until a more generic
> solution is available, so
>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Thanks!

-- 
Kind regards,

Sakari Ailus
sakari.ailus@linux.intel.com

  reply	other threads:[~2014-01-10  9:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-13 12:03 [RFC 1/2] media: Use a better owner for the media device Sakari Ailus
2013-12-13 12:03 ` [RFC 2/2] media: v4l: Only get module if it's different than the driver for v4l2_dev Sakari Ailus
2013-12-17 13:49   ` [RFC v1.1 " Sakari Ailus
2013-12-25 23:44     ` Laurent Pinchart
2014-01-10  9:08       ` Sakari Ailus [this message]
2013-12-25 23:23 ` [RFC 1/2] media: Use a better owner for the media device Laurent Pinchart

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=52CFB88C.4030109@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    /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.