summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authordann frazier <dannf@hp.com>2009-03-31 15:24:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 08:59:24 -0700
commit6b318f66dca829a72c974083cc10fd5556eec6f1 (patch)
treed093c8b50a8a28af03e678322eca1bdc6ef5c70e /drivers/rtc
parent05439f1f89aebbdb791c49e980f0f31652e4055b (diff)
rtc-parisc: remove struct parisc_rtc
parisc_rtc now only includes an rtc_device pointer, so let's just use the rtc_device type directly. Signed-off-by: dann frazier <dannf@hp.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-parisc.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c
index cb087ad407f6..ee4e9a3fb583 100644
--- a/drivers/rtc/rtc-parisc.c
+++ b/drivers/rtc/rtc-parisc.c
@@ -11,11 +11,6 @@
#include <asm/rtc.h>
-/* as simple as can be, and no simpler. */
-struct parisc_rtc {
- struct rtc_device *rtc;
-};
-
static int parisc_get_time(struct device *dev, struct rtc_time *tm)
{
unsigned long ret;
@@ -47,16 +42,16 @@ static const struct rtc_class_ops parisc_rtc_ops = {
static int __devinit parisc_rtc_probe(struct platform_device *dev)
{
- struct parisc_rtc *p;
+ struct rtc_device *p;
p = kzalloc(sizeof (*p), GFP_KERNEL);
if (!p)
return -ENOMEM;
- p->rtc = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops,
- THIS_MODULE);
- if (IS_ERR(p->rtc)) {
- int err = PTR_ERR(p->rtc);
+ p = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops,
+ THIS_MODULE);
+ if (IS_ERR(p)) {
+ int err = PTR_ERR(p);
kfree(p);
return err;
}
@@ -68,9 +63,9 @@ static int __devinit parisc_rtc_probe(struct platform_device *dev)
static int __devexit parisc_rtc_remove(struct platform_device *dev)
{
- struct parisc_rtc *p = platform_get_drvdata(dev);
+ struct rtc_device *p = platform_get_drvdata(dev);
- rtc_device_unregister(p->rtc);
+ rtc_device_unregister(p);
kfree(p);
return 0;