summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2015-10-21 11:26:08 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2015-10-21 16:24:31 +1100
commita6d50737fdfb227a35df8b2b477122b7891d92a1 (patch)
tree978fd29f347fb76e7fe049c110c175e46d900532
parenta901e1f13f32df4bd63b74a44e7b8b075d3535a1 (diff)
downloadlinux-a6d50737fdfb227a35df8b2b477122b7891d92a1.tar.gz
linux-a6d50737fdfb227a35df8b2b477122b7891d92a1.tar.xz
drivers/rtc/rtc-pcf2127.c hack
Cc: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--drivers/rtc/rtc-pcf2127.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c
index 5be50e26fe7a..03160e189bda 100644
--- a/drivers/rtc/rtc-pcf2127.c
+++ b/drivers/rtc/rtc-pcf2127.c
@@ -145,6 +145,7 @@ static int pcf2127_rtc_ioctl(struct device *dev,
struct i2c_client *client = to_i2c_client(dev);
unsigned char buf = PCF2127_REG_CTRL3;
int ret;
+ int foo;
switch (cmd) {
case RTC_VL_READ:
@@ -162,7 +163,8 @@ static int pcf2127_rtc_ioctl(struct device *dev,
buf = buf & PCF2127_REG_CTRL3_BLF ? 1 : 0;
- if (copy_to_user((void __user *)arg, &buf, sizeof(int)))
+ foo = buf; // ytf is an unsigned char called "buf"?
+ if (copy_to_user((void __user *)arg, &foo, sizeof(int)))
return -EFAULT;
return 0;
default: