aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorJan Kardell <jan.kardell@telliq.com>2014-12-10 18:53:31 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 20:41:14 -0500
commit17a1e5e830723f18eeb4ec00fa5a1032e378f06e (patch)
tree6cbb47aece78c70a8d4ffadae7d13988bf177228 /drivers/rtc
parent672e2b14741368134c8640e3851c841b422f6c45 (diff)
rtc: pcf8563: remove leftover code
Remove some code that was left from before block read/write was used. Signed-off-by: Jan Kardell <jan.kardell@telliq.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: Vincent Donnefort <vdonnefort@gmail.com> Cc: Dan Carpenter <dan.carpenter@oracle.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-pcf8563.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index c2ef0a22ee94..1a865c9f1127 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -118,22 +118,21 @@ static int pcf8563_write_block_data(struct i2c_client *client,
118 118
119static int pcf8563_set_alarm_mode(struct i2c_client *client, bool on) 119static int pcf8563_set_alarm_mode(struct i2c_client *client, bool on)
120{ 120{
121 unsigned char buf[2]; 121 unsigned char buf;
122 int err; 122 int err;
123 123
124 err = pcf8563_read_block_data(client, PCF8563_REG_ST2, 1, buf + 1); 124 err = pcf8563_read_block_data(client, PCF8563_REG_ST2, 1, &buf);
125 if (err < 0) 125 if (err < 0)
126 return err; 126 return err;
127 127
128 if (on) 128 if (on)
129 buf[1] |= PCF8563_BIT_AIE; 129 buf |= PCF8563_BIT_AIE;
130 else 130 else
131 buf[1] &= ~PCF8563_BIT_AIE; 131 buf &= ~PCF8563_BIT_AIE;
132 132
133 buf[1] &= ~PCF8563_BIT_AF; 133 buf &= ~PCF8563_BIT_AF;
134 buf[0] = PCF8563_REG_ST2;
135 134
136 err = pcf8563_write_block_data(client, PCF8563_REG_ST2, 1, buf + 1); 135 err = pcf8563_write_block_data(client, PCF8563_REG_ST2, 1, &buf);
137 if (err < 0) { 136 if (err < 0) {
138 dev_err(&client->dev, "%s: write error\n", __func__); 137 dev_err(&client->dev, "%s: write error\n", __func__);
139 return -EIO; 138 return -EIO;