From b6bf291f1c5bc84272a138b7367741e459005a81 Mon Sep 17 00:00:00 2001 From: Wim Van Sebroeck Date: Tue, 14 Apr 2009 20:30:55 +0000 Subject: [WATCHDOG] move platform probe and remove function to devinit and devexit A pointer to probe and remove functions is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/rm9k_wdt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/watchdog/rm9k_wdt.c') diff --git a/drivers/watchdog/rm9k_wdt.c b/drivers/watchdog/rm9k_wdt.c index cce1982a1b5..2e444264226 100644 --- a/drivers/watchdog/rm9k_wdt.c +++ b/drivers/watchdog/rm9k_wdt.c @@ -345,8 +345,8 @@ static const struct resource *wdt_gpi_get_resource(struct platform_device *pdv, return platform_get_resource_byname(pdv, type, buf); } -/* No hotplugging on the platform bus - use __init */ -static int __init wdt_gpi_probe(struct platform_device *pdv) +/* No hotplugging on the platform bus - use __devinit */ +static int __devinit wdt_gpi_probe(struct platform_device *pdv) { int res; const struct resource @@ -373,7 +373,7 @@ static int __init wdt_gpi_probe(struct platform_device *pdv) return res; } -static int __exit wdt_gpi_remove(struct platform_device *dev) +static int __devexit wdt_gpi_remove(struct platform_device *dev) { int res; -- cgit v1.2.3