Skip to content

Commit

Permalink
[WATCHDOG] pnx4008_wdt.c - remove patch
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wim Van Sebroeck committed Oct 2, 2006
1 parent 2898172 commit f676449
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/char/watchdog/pnx4008_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,17 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)

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;
}

Expand Down

0 comments on commit f676449

Please sign in to comment.