diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2009-04-14 16:30:55 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2009-06-18 03:30:44 -0400 |
commit | b6bf291f1c5bc84272a138b7367741e459005a81 (patch) | |
tree | 1989891cd0eefe7143f3809ca36627fe61fb759c /drivers/watchdog/rm9k_wdt.c | |
parent | a77dba7e444a6618cbb666d1b42b79842b9c0171 (diff) |
[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 <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/rm9k_wdt.c')
-rw-r--r-- | drivers/watchdog/rm9k_wdt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/watchdog/rm9k_wdt.c b/drivers/watchdog/rm9k_wdt.c index cce1982a1b58..2e4442642262 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, | |||
345 | return platform_get_resource_byname(pdv, type, buf); | 345 | return platform_get_resource_byname(pdv, type, buf); |
346 | } | 346 | } |
347 | 347 | ||
348 | /* No hotplugging on the platform bus - use __init */ | 348 | /* No hotplugging on the platform bus - use __devinit */ |
349 | static int __init wdt_gpi_probe(struct platform_device *pdv) | 349 | static int __devinit wdt_gpi_probe(struct platform_device *pdv) |
350 | { | 350 | { |
351 | int res; | 351 | int res; |
352 | const struct resource | 352 | const struct resource |
@@ -373,7 +373,7 @@ static int __init wdt_gpi_probe(struct platform_device *pdv) | |||
373 | return res; | 373 | return res; |
374 | } | 374 | } |
375 | 375 | ||
376 | static int __exit wdt_gpi_remove(struct platform_device *dev) | 376 | static int __devexit wdt_gpi_remove(struct platform_device *dev) |
377 | { | 377 | { |
378 | int res; | 378 | int res; |
379 | 379 | ||