projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e893de5
)
rtc: s3c: initialize s3c_rtc_cpu_type before using it
author
Maurus Cuelenaere
<
[email protected]
>
Fri, 4 Jun 2010 21:14:46 +0000
(14:14 -0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 4 Jun 2010 22:21:44 +0000
(15:21 -0700)
Make sure s3c_rtc_cpu_type is initialised _before_ it's used in an if()
check.
Reported-by: Jiri Pinkava <
[email protected]
>
Signed-off-by: Maurus Cuelenaere <
[email protected]
>
Cc: Paul Gortmaker <
[email protected]
>
Cc: Alessandro Zummo <
[email protected]
>
Cc: Maurus Cuelenaere <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/rtc/rtc-s3c.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-s3c.c
b/drivers/rtc/rtc-s3c.c
index 6adebf31ea69b27bf20d78b777125bff771ad169..70b68d35f9694c804272c1bca502253f15a563c9 100644
(file)
--- a/
drivers/rtc/rtc-s3c.c
+++ b/
drivers/rtc/rtc-s3c.c
@@
-508,13
+508,13
@@
static int __devinit s3c_rtc_probe(struct platform_device *pdev)
goto err_nortc;
}
+ s3c_rtc_cpu_type = platform_get_device_id(pdev)->driver_data;
+
if (s3c_rtc_cpu_type == TYPE_S3C64XX)
rtc->max_user_freq = 32768;
else
rtc->max_user_freq = 128;
- s3c_rtc_cpu_type = platform_get_device_id(pdev)->driver_data;
-
platform_set_drvdata(pdev, rtc);
s3c_rtc_setfreq(&pdev->dev, 1);