linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] watchdog: Staticise nuc900_wdt
@ 2012-01-18  2:45 Axel Lin
  2012-01-18  2:46 ` [PATCH 2/2] watchdog: Return proper error in nuc900wdt_probe if misc_register fails Axel Lin
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-01-18  2:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wan ZongShun, Wim Van Sebroeck, linux-watchdog

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

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/watchdog/nuc900_wdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c
index 50359ba..2cce856 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)
 {
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] watchdog: Return proper error in nuc900wdt_probe if misc_register fails
  2012-01-18  2:45 [PATCH 1/2] watchdog: Staticise nuc900_wdt Axel Lin
@ 2012-01-18  2:46 ` Axel Lin
  0 siblings, 0 replies; 2+ messages in thread
From: Axel Lin @ 2012-01-18  2:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wan ZongShun, Wim Van Sebroeck, linux-watchdog

Return proper error instead of 0 if misc_register fails

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/watchdog/nuc900_wdt.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c
index 2cce856..529085b 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;
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-18  2:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-18  2:45 [PATCH 1/2] watchdog: Staticise nuc900_wdt Axel Lin
2012-01-18  2:46 ` [PATCH 2/2] watchdog: Return proper error in nuc900wdt_probe if misc_register fails Axel Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).