[lkml]   [2010]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH/RFC] core: add a function to safely try to get device driver owner
On Mon, 29 Nov 2010 20:43:28 +0100 (CET)
Guennadi Liakhovetski <> wrote:

> When two drivers interoperate without an explicit dependency, it is often
> required to prevent one of them from being unloaded safely by dereferencing
> dev->driver->owner. This patch provides a generic function to do this in a
> race-free way.

I must ask: why not, instead, make the dependency explicit? In
particular, this looks like an application for the proposed media
controller code, which is meant to model the connections between otherwise
independent devices. The fact that your example comes from V4L2 (which is
the current domain of the media controller) also argues that way.


 \ /
  Last update: 2010-11-29 21:19    [W:0.039 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site