aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-dev.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-10-02 08:45:08 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-10-02 08:45:08 -0400
commit59458f40e25915a355d8b1d701425fe9f4f9ea23 (patch)
treef1c9a2934df686e36d75f759ab7313b6f0e0e5f9 /drivers/rtc/rtc-dev.c
parent825f9075d74028d11d7f5932f04e1b5db3022b51 (diff)
parentd834c16516d1ebec4766fc58c059bf01311e6045 (diff)
Merge branch 'master' into gfs2
Diffstat (limited to 'drivers/rtc/rtc-dev.c')
-rw-r--r--drivers/rtc/rtc-dev.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 61a58259c93f..583789c66cdb 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -24,7 +24,7 @@ static int rtc_dev_open(struct inode *inode, struct file *file)
24 int err; 24 int err;
25 struct rtc_device *rtc = container_of(inode->i_cdev, 25 struct rtc_device *rtc = container_of(inode->i_cdev,
26 struct rtc_device, char_dev); 26 struct rtc_device, char_dev);
27 struct rtc_class_ops *ops = rtc->ops; 27 const struct rtc_class_ops *ops = rtc->ops;
28 28
29 /* We keep the lock as long as the device is in use 29 /* We keep the lock as long as the device is in use
30 * and return immediately if busy 30 * and return immediately if busy
@@ -209,7 +209,7 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file,
209 int err = 0; 209 int err = 0;
210 struct class_device *class_dev = file->private_data; 210 struct class_device *class_dev = file->private_data;
211 struct rtc_device *rtc = to_rtc_device(class_dev); 211 struct rtc_device *rtc = to_rtc_device(class_dev);
212 struct rtc_class_ops *ops = rtc->ops; 212 const struct rtc_class_ops *ops = rtc->ops;
213 struct rtc_time tm; 213 struct rtc_time tm;
214 struct rtc_wkalrm alarm; 214 struct rtc_wkalrm alarm;
215 void __user *uarg = (void __user *) arg; 215 void __user *uarg = (void __user *) arg;
@@ -406,7 +406,6 @@ static int rtc_dev_add_device(struct class_device *class_dev,
406 rtc->char_dev.owner = rtc->owner; 406 rtc->char_dev.owner = rtc->owner;
407 407
408 if (cdev_add(&rtc->char_dev, MKDEV(MAJOR(rtc_devt), rtc->id), 1)) { 408 if (cdev_add(&rtc->char_dev, MKDEV(MAJOR(rtc_devt), rtc->id), 1)) {
409 cdev_del(&rtc->char_dev);
410 dev_err(class_dev->dev, 409 dev_err(class_dev->dev,
411 "failed to add char device %d:%d\n", 410 "failed to add char device %d:%d\n",
412 MAJOR(rtc_devt), rtc->id); 411 MAJOR(rtc_devt), rtc->id);
@@ -496,7 +495,7 @@ static void __exit rtc_dev_exit(void)
496 unregister_chrdev_region(rtc_devt, RTC_DEV_MAX); 495 unregister_chrdev_region(rtc_devt, RTC_DEV_MAX);
497} 496}
498 497
499module_init(rtc_dev_init); 498subsys_initcall(rtc_dev_init);
500module_exit(rtc_dev_exit); 499module_exit(rtc_dev_exit);
501 500
502MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>"); 501MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");