diff options
| author | Bartlomiej Zolnierkiewicz <[email protected]> | 2018-09-26 15:54:31 +0200 |
|---|---|---|
| committer | Bartlomiej Zolnierkiewicz <[email protected]> | 2018-09-26 15:54:31 +0200 |
| commit | aaccf3c97418f169afdbb5855e9cbcbda34e90fd (patch) | |
| tree | 5d4207e67958bdbc23288cf30178692f5534e1a0 /drivers/rtc/rtc-pcf85063.c | |
| parent | f39684524b391c5a7ed0ac44db4fec3357af1c5d (diff) | |
| parent | 6bf4ca7fbc85d80446ac01c0d1d77db4d91a6d84 (diff) | |
Merge tag 'v4.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next
Sync with upstream (which now contains fbdev-v4.19 changes) to
prepare a base for fbdev-v4.20 changes.
Diffstat (limited to 'drivers/rtc/rtc-pcf85063.c')
| -rw-r--r-- | drivers/rtc/rtc-pcf85063.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c index 49bcbb3d4a69..283c2335b01b 100644 --- a/drivers/rtc/rtc-pcf85063.c +++ b/drivers/rtc/rtc-pcf85063.c @@ -43,37 +43,38 @@ static struct i2c_driver pcf85063_driver; static int pcf85063_stop_clock(struct i2c_client *client, u8 *ctrl1) { - s32 ret; + int rc; + u8 reg; - ret = i2c_smbus_read_byte_data(client, PCF85063_REG_CTRL1); - if (ret < 0) { + rc = i2c_smbus_read_byte_data(client, PCF85063_REG_CTRL1); + if (rc < 0) { dev_err(&client->dev, "Failing to stop the clock\n"); return -EIO; } /* stop the clock */ - ret |= PCF85063_REG_CTRL1_STOP; + reg = rc | PCF85063_REG_CTRL1_STOP; - ret = i2c_smbus_write_byte_data(client, PCF85063_REG_CTRL1, ret); - if (ret < 0) { + rc = i2c_smbus_write_byte_data(client, PCF85063_REG_CTRL1, reg); + if (rc < 0) { dev_err(&client->dev, "Failing to stop the clock\n"); return -EIO; } - *ctrl1 = ret; + *ctrl1 = reg; return 0; } static int pcf85063_start_clock(struct i2c_client *client, u8 ctrl1) { - s32 ret; + int rc; /* start the clock */ ctrl1 &= ~PCF85063_REG_CTRL1_STOP; - ret = i2c_smbus_write_byte_data(client, PCF85063_REG_CTRL1, ctrl1); - if (ret < 0) { + rc = i2c_smbus_write_byte_data(client, PCF85063_REG_CTRL1, ctrl1); + if (rc < 0) { dev_err(&client->dev, "Failing to start the clock\n"); return -EIO; } |