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:
81d350e
)
rtc: rtc-max6902 - set driver data in max6902_probe()
author
Axel Lin
<
[email protected]
>
Thu, 13 Jan 2011 01:00:09 +0000
(17:00 -0800)
committer
Linus Torvalds
<
[email protected]
>
Thu, 13 Jan 2011 16:03:12 +0000
(08:03 -0800)
Current implementation does not set driver data in max6902_probe(), thus
calling platform_get_drvdata(spi) in max6902_remove() returns NULL.
Signed-off-by: Axel Lin <
[email protected]
>
Cc: Alessandro Zummo <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/rtc/rtc-max6902.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-max6902.c
b/drivers/rtc/rtc-max6902.c
index 657403ebd54a81fe7ddeda43d2c693234f148c81..0ec3f588a255dc1abe0cff5bc900cded2bdc8b59 100644
(file)
--- a/
drivers/rtc/rtc-max6902.c
+++ b/
drivers/rtc/rtc-max6902.c
@@
-139,12
+139,13
@@
static int __devinit max6902_probe(struct spi_device *spi)
if (IS_ERR(rtc))
return PTR_ERR(rtc);
+ dev_set_drvdata(&spi->dev, rtc);
return 0;
}
static int __devexit max6902_remove(struct spi_device *spi)
{
- struct rtc_device *rtc =
platform_get_drvdata(spi
);
+ struct rtc_device *rtc =
dev_get_drvdata(&spi->dev
);
rtc_device_unregister(rtc);
return 0;