[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080709205625.GE26734@flint.arm.linux.org.uk>
Date: Wed, 9 Jul 2008 21:56:25 +0100
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Ben Dooks <ben-linux@...ff.org>
Cc: linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.arm.linux.org.uk, dbaryshkov@...il.com
Subject: Re: [patch 4/4] MFD: Change mfd platform device usage to wrapper platform_device
On Wed, Jul 09, 2008 at 11:49:20AM +0100, Ben Dooks wrote:
> This patch changes the mfd core behaviour to wrapper the platform_device
> it creates in an struct mfd_device which contains the information
> about the cell that was created.
You can't do this. Grab a reference to the platform device (by holding
one of its sysfs files open) and then remove all the users of the mfd-core
module and the mfd-core module itself.
Then, read from that file and close it. Watch your kernel oops.
That's why device release methods inside modules are a BAD IDEA and why
we have the platform device alloc API.
--
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