diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2006-07-30 14:06:07 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2006-10-02 17:05:16 -0400 |
commit | f676449785d333078acb60ccf2046d0d3c59548f (patch) | |
tree | 0fe784a90db839b599440c2139b2c50ccb9e776a /drivers/char | |
parent | 2898172708aa84c9b0ce3865d6ff1ef76b538f51 (diff) |
[WATCHDOG] pnx4008_wdt.c - remove patch
Change remove code so that we first detach
the driver from userspace, then clean up the
clock and then clean up the memory we allocated.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/watchdog/pnx4008_wdt.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/watchdog/pnx4008_wdt.c b/drivers/char/watchdog/pnx4008_wdt.c index d36a169c1b86..465dfd3ba61a 100644 --- a/drivers/char/watchdog/pnx4008_wdt.c +++ b/drivers/char/watchdog/pnx4008_wdt.c | |||
@@ -297,17 +297,17 @@ out: | |||
297 | 297 | ||
298 | static int pnx4008_wdt_remove(struct platform_device *pdev) | 298 | static int pnx4008_wdt_remove(struct platform_device *pdev) |
299 | { | 299 | { |
300 | if (wdt_mem) { | 300 | misc_deregister(&pnx4008_wdt_miscdev); |
301 | release_resource(wdt_mem); | ||
302 | kfree(wdt_mem); | ||
303 | wdt_mem = NULL; | ||
304 | } | ||
305 | if (wdt_clk) { | 301 | if (wdt_clk) { |
306 | clk_set_rate(wdt_clk, 0); | 302 | clk_set_rate(wdt_clk, 0); |
307 | clk_put(wdt_clk); | 303 | clk_put(wdt_clk); |
308 | wdt_clk = NULL; | 304 | wdt_clk = NULL; |
309 | } | 305 | } |
310 | misc_deregister(&pnx4008_wdt_miscdev); | 306 | if (wdt_mem) { |
307 | release_resource(wdt_mem); | ||
308 | kfree(wdt_mem); | ||
309 | wdt_mem = NULL; | ||
310 | } | ||
311 | return 0; | 311 | return 0; |
312 | } | 312 | } |
313 | 313 | ||