[PATCH 0/3] omap hsmmc init cleanup and section warning fixes for v3.4 merge window
Russell King - ARM Linux
linux at arm.linux.org.uk
Fri Feb 17 05:06:32 EST 2012
On Fri, Feb 17, 2012 at 03:29:55PM +0530, Rajendra Nayak wrote:
> hmm, rmmod does not even seem to trigger the drivers .remove if there
> are outstanding requests on the module, so a pdata->teardown called
> from within the .remove does not help to get the gpio_requests done
> from the board file cleaned.
If the module use count is non-zero, then it's only right that it won't
let you remove the module. So as far as that goes, that's fine.
However, it's still possible to unbind the device:
echo twl4030_gpio > /sys/bus/platform/driver/twl4030_gpio/unbind
and rebind it:
echo twl4030_gpio > /sys/bus/platform/driver/twl4030_gpio/bind
assuming that the gpios device name is twl4030_gpio and not twl4030_gpio.0.
This would be equivalent to my steps (4) and (5).
As you point out, the there's no teardown function, which suggests that
the gpios won't be able to be requested at step (5). You'll probably
also get a WARN_ON() dump too when the hsmmc device is registered for a
second time, or maybe an oops (as it'll be a device which has already
been registered being registered for a second time).
More information about the linux-arm-kernel
mailing list