From e352829a67c1a80c73dfad33ba9dca8ddf2ef0fd Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Wed, 18 Jan 2012 10:45:20 +0800 Subject: watchdog: Staticise nuc900_wdt It is only used in this driver, so no need to make the symbol global. Signed-off-by: Axel Lin Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/nuc900_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/watchdog/nuc900_wdt.c') diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c index 50359bad9177..2cce8568bd21 100644 --- a/drivers/watchdog/nuc900_wdt.c +++ b/drivers/watchdog/nuc900_wdt.c @@ -72,7 +72,7 @@ struct nuc900_wdt { }; static unsigned long nuc900wdt_busy; -struct nuc900_wdt *nuc900_wdt; +static struct nuc900_wdt *nuc900_wdt; static inline void nuc900_wdt_keepalive(void) { -- cgit v1.2.3 From 2865e770c9dddd40676eadf7c3dfe80aee7628e4 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Wed, 18 Jan 2012 10:46:52 +0800 Subject: watchdog: Return proper error in nuc900wdt_probe if misc_register fails Return proper error instead of 0 if misc_register fails Signed-off-by: Axel Lin Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/nuc900_wdt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/watchdog/nuc900_wdt.c') diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c index 2cce8568bd21..529085b8b8fb 100644 --- a/drivers/watchdog/nuc900_wdt.c +++ b/drivers/watchdog/nuc900_wdt.c @@ -287,7 +287,8 @@ static int __devinit nuc900wdt_probe(struct platform_device *pdev) setup_timer(&nuc900_wdt->timer, nuc900_wdt_timer_ping, 0); - if (misc_register(&nuc900wdt_miscdev)) { + ret = misc_register(&nuc900wdt_miscdev); + if (ret) { dev_err(&pdev->dev, "err register miscdev on minor=%d (%d)\n", WATCHDOG_MINOR, ret); goto err_clk; -- cgit v1.2.3