Skip to contentSkip to conversation

watchdog: Staticise nuc900_wdt

PATCH New Axel Lin 1 participant 2 messages Jan 18, 2012 Watchdog device drivers

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 watchdog: Staticise nuc900_wdt

It is only used in this driver, so no need to make the symbol global.

---
 drivers/watchdog/nuc900_wdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/nuc900_wdt.c +1 -1
index 50359ba..2cce856 100644
@@ -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)
 {
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH 2/2 watchdog: Return proper error in nuc900wdt_probe if misc_register fails

Return proper error instead of 0 if misc_register fails

---
 drivers/watchdog/nuc900_wdt.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/watchdog/nuc900_wdt.c +2 -1
index 2cce856..529085b 100644
@@ -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;
Signature · 1 line
1.7.5.4