diff options
author | David Brownell <david-b@pacbell.net> | 2007-05-08 03:33:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:18 -0400 |
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 623cb8d06b02..2c13433089a0 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) | |||
34 | 34 | ||
35 | file->private_data = rtc; | 35 | file->private_data = rtc; |
36 | 36 | ||
37 | err = ops->open ? ops->open(rtc->class_dev.dev) : 0; | 37 | err = ops->open ? ops->open(rtc->dev.parent) : 0; |
38 | if (err == 0) { | 38 | if (err == 0) { |
39 | spin_lock_irq(&rtc->irq_lock); | 39 | spin_lock_irq(&rtc->irq_lock); |
40 | rtc->irq_data = 0; | 40 | rtc->irq_data = 0; |
@@ -180,7 +180,7 @@ rtc_dev_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) | |||
180 | if (ret == 0) { | 180 | if (ret == 0) { |
181 | /* Check for any data updates */ | 181 | /* Check for any data updates */ |
182 | if (rtc->ops->read_callback) | 182 | if (rtc->ops->read_callback) |
183 | data = rtc->ops->read_callback(rtc->class_dev.dev, | 183 | data = rtc->ops->read_callback(rtc->dev.parent, |
184 | data); | 184 | data); |
185 | 185 | ||
186 | if (sizeof(int) != sizeof(long) && | 186 | if (sizeof(int) != sizeof(long) && |
@@ -251,7 +251,7 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file, | |||
251 | 251 | ||
252 | /* try the driver's ioctl interface */ | 252 | /* try the driver's ioctl interface */ |
253 | if (ops->ioctl) { | 253 | if (ops->ioctl) { |
254 | err = ops->ioctl(rtc->class_dev.dev, cmd, arg); | 254 | err = ops->ioctl(rtc->dev.parent, cmd, arg); |
255 | if (err != -ENOIOCTLCMD) | 255 | if (err != -ENOIOCTLCMD) |
256 | return err; | 256 | return err; |
257 | } | 257 | } |
@@ -371,7 +371,7 @@ static int rtc_dev_release(struct inode *inode, struct file *file) | |||
371 | clear_uie(rtc); | 371 | clear_uie(rtc); |
372 | #endif | 372 | #endif |
373 | if (rtc->ops->release) | 373 | if (rtc->ops->release) |
374 | rtc->ops->release(rtc->class_dev.dev); | 374 | rtc->ops->release(rtc->dev.parent); |
375 | 375 | ||
376 | mutex_unlock(&rtc->char_lock); | 376 | mutex_unlock(&rtc->char_lock); |
377 | return 0; | 377 | return 0; |
@@ -406,7 +406,7 @@ void rtc_dev_add_device(struct rtc_device *rtc) | |||
406 | return; | 406 | return; |
407 | } | 407 | } |
408 | 408 | ||
409 | rtc->class_dev.devt = MKDEV(MAJOR(rtc_devt), rtc->id); | 409 | rtc->dev.devt = MKDEV(MAJOR(rtc_devt), rtc->id); |
410 | 410 | ||
411 | mutex_init(&rtc->char_lock); | 411 | mutex_init(&rtc->char_lock); |
412 | spin_lock_init(&rtc->irq_lock); | 412 | spin_lock_init(&rtc->irq_lock); |
@@ -419,7 +419,7 @@ void rtc_dev_add_device(struct rtc_device *rtc) | |||
419 | cdev_init(&rtc->char_dev, &rtc_dev_fops); | 419 | cdev_init(&rtc->char_dev, &rtc_dev_fops); |
420 | rtc->char_dev.owner = rtc->owner; | 420 | rtc->char_dev.owner = rtc->owner; |
421 | 421 | ||
422 | if (cdev_add(&rtc->char_dev, rtc->class_dev.devt, 1)) | 422 | if (cdev_add(&rtc->char_dev, rtc->dev.devt, 1)) |
423 | printk(KERN_WARNING "%s: failed to add char device %d:%d\n", | 423 | printk(KERN_WARNING "%s: failed to add char device %d:%d\n", |
424 | rtc->name, MAJOR(rtc_devt), rtc->id); | 424 | rtc->name, MAJOR(rtc_devt), rtc->id); |
425 | else | 425 | else |
@@ -429,7 +429,7 @@ void rtc_dev_add_device(struct rtc_device *rtc) | |||
429 | 429 | ||
430 | void rtc_dev_del_device(struct rtc_device *rtc) | 430 | void rtc_dev_del_device(struct rtc_device *rtc) |
431 | { | 431 | { |
432 | if (rtc->class_dev.devt) | 432 | if (rtc->dev.devt) |
433 | cdev_del(&rtc->char_dev); | 433 | cdev_del(&rtc->char_dev); |
434 | } | 434 | } |
435 | 435 | ||