diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2006-07-30 20:06:07 +0200 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2006-10-02 23:05:16 +0200 |
commit | f676449785d333078acb60ccf2046d0d3c59548f (patch) | |
tree | 0fe784a90db839b599440c2139b2c50ccb9e776a /drivers/char | |
parent | 2898172708aa84c9b0ce3865d6ff1ef76b538f51 (diff) | |
download | linux-3.10-f676449785d333078acb60ccf2046d0d3c59548f.tar.gz linux-3.10-f676449785d333078acb60ccf2046d0d3c59548f.tar.bz2 linux-3.10-f676449785d333078acb60ccf2046d0d3c59548f.zip |
[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 d36a169c1b8..465dfd3ba61 100644 --- a/drivers/char/watchdog/pnx4008_wdt.c +++ b/drivers/char/watchdog/pnx4008_wdt.c @@ -297,17 +297,17 @@ out: static int pnx4008_wdt_remove(struct platform_device *pdev) { - if (wdt_mem) { - release_resource(wdt_mem); - kfree(wdt_mem); - wdt_mem = NULL; - } + misc_deregister(&pnx4008_wdt_miscdev); if (wdt_clk) { clk_set_rate(wdt_clk, 0); clk_put(wdt_clk); wdt_clk = NULL; } - misc_deregister(&pnx4008_wdt_miscdev); + if (wdt_mem) { + release_resource(wdt_mem); + kfree(wdt_mem); + wdt_mem = NULL; + } return 0; } |