[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101129152838.4ff57277@bike.lwn.net>
Date: Mon, 29 Nov 2010 15:28:38 -0700
From: Jonathan Corbet <corbet@....net>
To: Guennadi Liakhovetski <g.liakhovetski@....de>
Cc: Greg KH <greg@...ah.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH/RFC] core: add a function to safely try to get device
driver owner
On Mon, 29 Nov 2010 23:10:50 +0100 (CET)
Guennadi Liakhovetski <g.liakhovetski@....de> wrote:
> In my case I have two platform devices: CEU and CSI2. In some cases (with
> parallel sensors) CEU operates on its own. With serial (CSI-2) camera
> sensors we need the CSI2 driver. So, I want to
> try_module_get(csi2_dev->driver->owner) the CSI2 driver from my CEU
> driver. This call can Oops if not done safely. Am I missing something? Is
> there an easier way to achieve the same?
This looks exactly like what the V4L2 subdev mechanism was meant to do.
Is there a reason you can't use that interface?
Thanks,
jon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists