瀏覽代碼

rtc-rs5c313.c: error and warning are fixed

Correct a compile error and warning.

Signed-off-by: kogiidena <kogiidena@eggplant.ddo.jp>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kogiidena 18 年之前
父節點
當前提交
9a3f1d53db
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      drivers/rtc/Kconfig
  2. 3 3
      drivers/rtc/rtc-rs5c313.c

+ 1 - 1
drivers/rtc/Kconfig

@@ -397,7 +397,7 @@ config RTC_DRV_BFIN
 
 
 config RTC_DRV_RS5C313
 config RTC_DRV_RS5C313
 	tristate "Ricoh RS5C313"
 	tristate "Ricoh RS5C313"
-	depends on RTC_CLASS && BROKEN
+	depends on RTC_CLASS && SH_LANDISK
 	help
 	help
 	  If you say yes here you get support for the Ricoh RS5C313 RTC chips.
 	  If you say yes here you get support for the Ricoh RS5C313 RTC chips.
 
 

+ 3 - 3
drivers/rtc/rtc-rs5c313.c

@@ -126,7 +126,7 @@ static void rs5c313_write_data(unsigned char data)
 static unsigned char rs5c313_read_data(void)
 static unsigned char rs5c313_read_data(void)
 {
 {
 	int i;
 	int i;
-	unsigned char data;
+	unsigned char data = 0;
 
 
 	for (i = 0; i < 8; i++) {
 	for (i = 0; i < 8; i++) {
 		ndelay(700);
 		ndelay(700);
@@ -194,7 +194,7 @@ static void rs5c313_write_reg(unsigned char addr, unsigned char data)
 	return;
 	return;
 }
 }
 
 
-static inline unsigned char rs5c313_read_cntreg(unsigned char addr)
+static inline unsigned char rs5c313_read_cntreg(void)
 {
 {
 	return rs5c313_read_reg(RS5C313_ADDR_CNTREG);
 	return rs5c313_read_reg(RS5C313_ADDR_CNTREG);
 }
 }
@@ -356,7 +356,7 @@ static int rs5c313_rtc_probe(struct platform_device *pdev)
 
 
 	platform_set_drvdata(pdev, rtc);
 	platform_set_drvdata(pdev, rtc);
 
 
-	return err;
+	return 0;
 }
 }
 
 
 static int __devexit rs5c313_rtc_remove(struct platform_device *pdev)
 static int __devexit rs5c313_rtc_remove(struct platform_device *pdev)