diff options
author | David Brownell <david-b@pacbell.net> | 2007-05-08 00:33:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 11:15:18 -0700 |
commit | cd9662094edf4173e87f0452e57e4eacc228f8ff (patch) | |
tree | 819d487aad05c7e61531bd25e3e7a0d4c08c6616 /drivers/rtc/rtc-dev.c | |
parent | 7d9f99eccc8f94ace31030a2a7ff73cf5f8c12a0 (diff) |
rtc: remove rest of class_device
Finish converting the RTC framework so it no longer uses class_device.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-By: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-dev.c')
-rw-r--r-- | drivers/rtc/rtc-dev.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index 623cb8d06b0..2c13433089a 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c @@ -34,7 +34,7 @@ static int rtc_dev_open(struct inode *inode, struct file *file) file->private_data = rtc; - err = ops->open ? ops->open(rtc->class_dev.dev) : 0; + err = ops->open ? ops->open(rtc->dev.parent) : 0; if (err == 0) { spin_lock_irq(&rtc->irq_lock); rtc->irq_data = 0; @@ -180,7 +180,7 @@ rtc_dev_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) if (ret == 0) { /* Check for any data updates */ if (rtc->ops->read_callback) - data = rtc->ops->read_callback(rtc->class_dev.dev, + data = rtc->ops->read_callback(rtc->dev.parent, data); if (sizeof(int) != sizeof(long) && @@ -251,7 +251,7 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file, /* try the driver's ioctl interface */ if (ops->ioctl) { - err = ops->ioctl(rtc->class_dev.dev, cmd, arg); + err = ops->ioctl(rtc->dev.parent, cmd, arg); if (err != -ENOIOCTLCMD) return err; } @@ -371,7 +371,7 @@ static int rtc_dev_release(struct inode *inode, struct file *file) clear_uie(rtc); #endif if (rtc->ops->release) - rtc->ops->release(rtc->class_dev.dev); + rtc->ops->release(rtc->dev.parent); mutex_unlock(&rtc->char_lock); return 0; @@ -406,7 +406,7 @@ void rtc_dev_add_device(struct rtc_device *rtc) return; } - rtc->class_dev.devt = MKDEV(MAJOR(rtc_devt), rtc->id); + rtc->dev.devt = MKDEV(MAJOR(rtc_devt), rtc->id); mutex_init(&rtc->char_lock); spin_lock_init(&rtc->irq_lock); @@ -419,7 +419,7 @@ void rtc_dev_add_device(struct rtc_device *rtc) cdev_init(&rtc->char_dev, &rtc_dev_fops); rtc->char_dev.owner = rtc->owner; - if (cdev_add(&rtc->char_dev, rtc->class_dev.devt, 1)) + if (cdev_add(&rtc->char_dev, rtc->dev.devt, 1)) printk(KERN_WARNING "%s: failed to add char device %d:%d\n", rtc->name, MAJOR(rtc_devt), rtc->id); else @@ -429,7 +429,7 @@ void rtc_dev_add_device(struct rtc_device *rtc) void rtc_dev_del_device(struct rtc_device *rtc) { - if (rtc->class_dev.devt) + if (rtc->dev.devt) cdev_del(&rtc->char_dev); } |