Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=88efe137394f58fb5893013e123e4bcf444fd44b
Commit:     88efe137394f58fb5893013e123e4bcf444fd44b
Parent:     97144c67566241db46633727f2860e6428373fe4
Author:     Mark Zhan <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 01:28:17 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 09:43:13 2007 -0700

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Mark Zhan <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/rtc/rtc-dev.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 362400d..87d4add 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)
 static ssize_t
 rtc_dev_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
 {
-       struct rtc_device *rtc = to_rtc_device(file->private_data);
+       struct rtc_device *rtc = file->private_data;
 
        DECLARE_WAITQUEUE(wait, current);
        unsigned long data;
@@ -196,7 +196,7 @@ rtc_dev_read(struct file *file, char __user *buf, size_t 
count, loff_t *ppos)
 
 static unsigned int rtc_dev_poll(struct file *file, poll_table *wait)
 {
-       struct rtc_device *rtc = to_rtc_device(file->private_data);
+       struct rtc_device *rtc = file->private_data;
        unsigned long data;
 
        poll_wait(file, &rtc->irq_queue, wait);
@@ -396,7 +396,7 @@ static int rtc_dev_ioctl(struct inode *inode, struct file 
*file,
 
 static int rtc_dev_release(struct inode *inode, struct file *file)
 {
-       struct rtc_device *rtc = to_rtc_device(file->private_data);
+       struct rtc_device *rtc = file->private_data;
 
 #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL
        clear_uie(rtc);
@@ -410,7 +410,7 @@ static int rtc_dev_release(struct inode *inode, struct file 
*file)
 
 static int rtc_dev_fasync(int fd, struct file *file, int on)
 {
-       struct rtc_device *rtc = to_rtc_device(file->private_data);
+       struct rtc_device *rtc = file->private_data;
        return fasync_helper(fd, file, on, &rtc->async_queue);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to