Commit 17a1e5e8 authored by Jan Kardell's avatar Jan Kardell Committed by Linus Torvalds

rtc: pcf8563: remove leftover code

Remove some code that was left from before block read/write was used.
Signed-off-by: default avatarJan 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 672e2b14
...@@ -118,22 +118,21 @@ static int pcf8563_write_block_data(struct i2c_client *client, ...@@ -118,22 +118,21 @@ static int pcf8563_write_block_data(struct i2c_client *client,
static int pcf8563_set_alarm_mode(struct i2c_client *client, bool on) static int pcf8563_set_alarm_mode(struct i2c_client *client, bool on)
{ {
unsigned char buf[2]; unsigned char buf;
int err; int err;
err = pcf8563_read_block_data(client, PCF8563_REG_ST2, 1, buf + 1); err = pcf8563_read_block_data(client, PCF8563_REG_ST2, 1, &buf);
if (err < 0) if (err < 0)
return err; return err;
if (on) if (on)
buf[1] |= PCF8563_BIT_AIE; buf |= PCF8563_BIT_AIE;
else else
buf[1] &= ~PCF8563_BIT_AIE; buf &= ~PCF8563_BIT_AIE;
buf[1] &= ~PCF8563_BIT_AF; buf &= ~PCF8563_BIT_AF;
buf[0] = PCF8563_REG_ST2;
err = pcf8563_write_block_data(client, PCF8563_REG_ST2, 1, buf + 1); err = pcf8563_write_block_data(client, PCF8563_REG_ST2, 1, &buf);
if (err < 0) { if (err < 0) {
dev_err(&client->dev, "%s: write error\n", __func__); dev_err(&client->dev, "%s: write error\n", __func__);
return -EIO; return -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment