rtc: isl12022: simplify some expressions
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Wed, 21 Sep 2022 11:46:19 +0000 (13:46 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 12 Oct 2022 22:17:21 +0000 (00:17 +0200)
These instances of '&client->dev' might as well be spelled 'dev', since
'client' has been computed from 'dev' via 'client =
to_i2c_client(dev)'.

Later patches will get rid of that local variable 'client', so remove
these unnecessary references so those later patches become easier to
read.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20220921114624.3250848-5-linux@rasmusvillemoes.dk
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-isl12022.c

index 2fc9fbe..7efe23f 100644 (file)
@@ -112,13 +112,13 @@ static int isl12022_rtc_read_time(struct device *dev, struct rtc_time *tm)
                return ret;
 
        if (buf[ISL12022_REG_SR] & (ISL12022_SR_LBAT85 | ISL12022_SR_LBAT75)) {
-               dev_warn(&client->dev,
+               dev_warn(dev,
                         "voltage dropped below %u%%, "
                         "date and time is not reliable.\n",
                         buf[ISL12022_REG_SR] & ISL12022_SR_LBAT85 ? 85 : 75);
        }
 
-       dev_dbg(&client->dev,
+       dev_dbg(dev,
                "%s: raw data is sec=%02x, min=%02x, hr=%02x, "
                "mday=%02x, mon=%02x, year=%02x, wday=%02x, "
                "sr=%02x, int=%02x",
@@ -141,7 +141,7 @@ static int isl12022_rtc_read_time(struct device *dev, struct rtc_time *tm)
        tm->tm_mon = bcd2bin(buf[ISL12022_REG_MO] & 0x1F) - 1;
        tm->tm_year = bcd2bin(buf[ISL12022_REG_YR]) + 100;
 
-       dev_dbg(&client->dev, "%s: secs=%d, mins=%d, hours=%d, "
+       dev_dbg(dev, "%s: secs=%d, mins=%d, hours=%d, "
                "mday=%d, mon=%d, year=%d, wday=%d\n",
                __func__,
                tm->tm_sec, tm->tm_min, tm->tm_hour,
@@ -158,7 +158,7 @@ static int isl12022_rtc_set_time(struct device *dev, struct rtc_time *tm)
        int ret;
        uint8_t buf[ISL12022_REG_DW + 1];
 
-       dev_dbg(&client->dev, "%s: secs=%d, mins=%d, hours=%d, "
+       dev_dbg(dev, "%s: secs=%d, mins=%d, hours=%d, "
                "mday=%d, mon=%d, year=%d, wday=%d\n",
                __func__,
                tm->tm_sec, tm->tm_min, tm->tm_hour,