Skip to content

Commit 23bd022

Browse files
cpackham-atlnzgroeck
authored andcommitted
hwmon: (adt7470) Fix some style issues
In preparation for the changes that follow fix up some existing style issues. Specifically: - add blank line between variable declaration and code - use strscpy instead of strlcpy - remove unnecessary braces Signed-off-by: Chris Packham <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 25572c8 commit 23bd022

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hwmon/adt7470.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ struct adt7470_data {
174174
static inline int adt7470_read_word_data(struct i2c_client *client, u8 reg)
175175
{
176176
u16 foo;
177+
177178
foo = i2c_smbus_read_byte_data(client, reg);
178179
foo |= ((u16)i2c_smbus_read_byte_data(client, reg + 1) << 8);
179180
return foo;
@@ -1282,7 +1283,7 @@ static int adt7470_detect(struct i2c_client *client,
12821283
if (revision != ADT7470_REVISION)
12831284
return -ENODEV;
12841285

1285-
strlcpy(info->type, "adt7470", I2C_NAME_SIZE);
1286+
strscpy(info->type, "adt7470", I2C_NAME_SIZE);
12861287

12871288
return 0;
12881289
}
@@ -1331,9 +1332,8 @@ static int adt7470_probe(struct i2c_client *client)
13311332

13321333
data->auto_update = kthread_run(adt7470_update_thread, client, "%s",
13331334
dev_name(hwmon_dev));
1334-
if (IS_ERR(data->auto_update)) {
1335+
if (IS_ERR(data->auto_update))
13351336
return PTR_ERR(data->auto_update);
1336-
}
13371337

13381338
return 0;
13391339
}

0 commit comments

Comments
 (0)