提交 f6764497 编写于 作者: W Wim Van Sebroeck

[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: NWim Van Sebroeck <wim@iguana.be>
上级 28981727
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册