Skip to content

Commit 33c1452

Browse files
LiHuiSong1krzk
authored andcommitted
w1: w1_therm: w1: Use HWMON_CHANNEL_INFO macro to simplify code
Use HWMON_CHANNEL_INFO macro to simplify code. Signed-off-by: Huisong Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent 0dd6770 commit 33c1452

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

drivers/w1/slaves/w1_therm.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -444,18 +444,8 @@ static int w1_read(struct device *dev, enum hwmon_sensor_types type,
444444
}
445445
}
446446

447-
static const u32 w1_temp_config[] = {
448-
HWMON_T_INPUT,
449-
0
450-
};
451-
452-
static const struct hwmon_channel_info w1_temp = {
453-
.type = hwmon_temp,
454-
.config = w1_temp_config,
455-
};
456-
457447
static const struct hwmon_channel_info * const w1_info[] = {
458-
&w1_temp,
448+
HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT),
459449
NULL
460450
};
461451

0 commit comments

Comments
 (0)