aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorMark Zhan <rongkai.zhan@windriver.com>2007-10-16 04:28:17 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:13 -0400
commit88efe137394f58fb5893013e123e4bcf444fd44b (patch)
tree0db4b0a83b48101b52d597efb40d1a117ce1140e /drivers/rtc
parent97144c67566241db46633727f2860e6428373fe4 (diff)
rtc-dev: no need to convert file->private_data to rtc device
In rtc-dev.c, when a rtc device is opened, file->private_data is already attached with the rtc device pointer, so there is no need to call to_rtc_device() to convert file->private_data to a rtc device pointer. Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Mark Zhan <rongkai.zhan@windriver.com> 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-dev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 362400db2e8b..87d4add6b7f6 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -142,7 +142,7 @@ static int set_uie(struct rtc_device *rtc)
142static ssize_t 142static ssize_t
143rtc_dev_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) 143rtc_dev_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
144{ 144{
145 struct rtc_device *rtc = to_rtc_device(file->private_data); 145 struct rtc_device *rtc = file->private_data;
146 146
147 DECLARE_WAITQUEUE(wait, current); 147 DECLARE_WAITQUEUE(wait, current);
148 unsigned long data; 148 unsigned long data;
@@ -196,7 +196,7 @@ rtc_dev_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
196 196
197static unsigned int rtc_dev_poll(struct file *file, poll_table *wait) 197static unsigned int rtc_dev_poll(struct file *file, poll_table *wait)
198{ 198{
199 struct rtc_device *rtc = to_rtc_device(file->private_data); 199 struct rtc_device *rtc = file->private_data;
200 unsigned long data; 200 unsigned long data;
201 201
202 poll_wait(file, &rtc->irq_queue, wait); 202 poll_wait(file, &rtc->irq_queue, wait);
@@ -396,7 +396,7 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file,
396 396
397static int rtc_dev_release(struct inode *inode, struct file *file) 397static int rtc_dev_release(struct inode *inode, struct file *file)
398{ 398{
399 struct rtc_device *rtc = to_rtc_device(file->private_data); 399 struct rtc_device *rtc = file->private_data;
400 400
401#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL 401#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL
402 clear_uie(rtc); 402 clear_uie(rtc);
@@ -410,7 +410,7 @@ static int rtc_dev_release(struct inode *inode, struct file *file)
410 410
411static int rtc_dev_fasync(int fd, struct file *file, int on) 411static int rtc_dev_fasync(int fd, struct file *file, int on)
412{ 412{
413 struct rtc_device *rtc = to_rtc_device(file->private_data); 413 struct rtc_device *rtc = file->private_data;
414 return fasync_helper(fd, file, on, &rtc->async_queue); 414 return fasync_helper(fd, file, on, &rtc->async_queue);
415} 415}
416 416