+ rtc-rtc-dev-tweak-for-64-bit-kernel.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     RTC: rtc-dev tweak for 64-bit kernel

has been added to the -mm tree.  Its filename is

     rtc-rtc-dev-tweak-for-64-bit-kernel.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Atsushi Nemoto <anemo@xxxxxxxxxxxxx>

Signed-off-by: Atsushi Nemoto <anemo@xxxxxxxxxxxxx>
Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/rtc/rtc-dev.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff -puN drivers/rtc/rtc-dev.c~rtc-rtc-dev-tweak-for-64-bit-kernel drivers/rtc/rtc-dev.c
--- devel/drivers/rtc/rtc-dev.c~rtc-rtc-dev-tweak-for-64-bit-kernel	2006-04-28 23:30:18.000000000 -0700
+++ devel-akpm/drivers/rtc/rtc-dev.c	2006-04-28 23:31:42.000000000 -0700
@@ -58,7 +58,7 @@ rtc_dev_read(struct file *file, char __u
 	unsigned long data;
 	ssize_t ret;
 
-	if (count < sizeof(unsigned long))
+	if (count != sizeof(unsigned int) && count < sizeof(unsigned long))
 		return -EINVAL;
 
 	add_wait_queue(&rtc->irq_queue, &wait);
@@ -90,11 +90,15 @@ rtc_dev_read(struct file *file, char __u
 	if (ret == 0) {
 		/* Check for any data updates */
 		if (rtc->ops->read_callback)
-			data = rtc->ops->read_callback(rtc->class_dev.dev, data);
+			data = rtc->ops->read_callback(rtc->class_dev.dev,data);
 
-		ret = put_user(data, (unsigned long __user *)buf);
-		if (ret == 0)
-			ret = sizeof(unsigned long);
+		if (sizeof(int) != sizeof(long) &&
+		    count == sizeof(unsigned int))
+			ret = put_user(data, (unsigned int __user *)buf) ?:
+				sizeof(unsigned int);
+		else
+			ret = put_user(data, (unsigned long __user *)buf) ?:
+				sizeof(unsigned long);
 	}
 	return ret;
 }
_

Patches currently in -mm which might be from anemo@xxxxxxxxxxxxx are

origin.patch
git-cryptodev.patch
rtc-rtc-dev-tweak-for-64-bit-kernel.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux