Skip to content

Commit ca35887

Browse files
Villemoesalexandrebelloni
authored andcommitted
rtc: isl12022: simplify some expressions
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 43a96b9 commit ca35887

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/rtc/rtc-isl12022.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ static int isl12022_rtc_read_time(struct device *dev, struct rtc_time *tm)
112112
return ret;
113113

114114
if (buf[ISL12022_REG_SR] & (ISL12022_SR_LBAT85 | ISL12022_SR_LBAT75)) {
115-
dev_warn(&client->dev,
115+
dev_warn(dev,
116116
"voltage dropped below %u%%, "
117117
"date and time is not reliable.\n",
118118
buf[ISL12022_REG_SR] & ISL12022_SR_LBAT85 ? 85 : 75);
119119
}
120120

121-
dev_dbg(&client->dev,
121+
dev_dbg(dev,
122122
"%s: raw data is sec=%02x, min=%02x, hr=%02x, "
123123
"mday=%02x, mon=%02x, year=%02x, wday=%02x, "
124124
"sr=%02x, int=%02x",
@@ -141,7 +141,7 @@ static int isl12022_rtc_read_time(struct device *dev, struct rtc_time *tm)
141141
tm->tm_mon = bcd2bin(buf[ISL12022_REG_MO] & 0x1F) - 1;
142142
tm->tm_year = bcd2bin(buf[ISL12022_REG_YR]) + 100;
143143

144-
dev_dbg(&client->dev, "%s: secs=%d, mins=%d, hours=%d, "
144+
dev_dbg(dev, "%s: secs=%d, mins=%d, hours=%d, "
145145
"mday=%d, mon=%d, year=%d, wday=%d\n",
146146
__func__,
147147
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)
158158
int ret;
159159
uint8_t buf[ISL12022_REG_DW + 1];
160160

161-
dev_dbg(&client->dev, "%s: secs=%d, mins=%d, hours=%d, "
161+
dev_dbg(dev, "%s: secs=%d, mins=%d, hours=%d, "
162162
"mday=%d, mon=%d, year=%d, wday=%d\n",
163163
__func__,
164164
tm->tm_sec, tm->tm_min, tm->tm_hour,

0 commit comments

Comments
 (0)