Move `T_Sensor` addition into a separate `case` statement in preparation
for the next patch that introduces a board without it.
No functional change.
Signed-off-by: Oleksandr Natalenko <[email protected]>
---
drivers/hwmon/asus_wmi_sensors.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/hwmon/asus_wmi_sensors.c b/drivers/hwmon/asus_wmi_sensors.c
index 6b04fad18891..98e761861601 100644
--- a/drivers/hwmon/asus_wmi_sensors.c
+++ b/drivers/hwmon/asus_wmi_sensors.c
@@ -144,14 +144,22 @@ static void asus_wmi_ec_fill_board_sensors(struct asus_wmi_ec_info *ec, int boar
asus_wmi_ec_set_sensor_info(si++, "Motherboard", hwmon_temp,
asus_wmi_ec_make_sensor_address(1, 0x00, 0x3C),
&ec->nr_registers);
- asus_wmi_ec_set_sensor_info(si++, "T_Sensor", hwmon_temp,
- asus_wmi_ec_make_sensor_address(1, 0x00, 0x3D),
- &ec->nr_registers);
asus_wmi_ec_set_sensor_info(si++, "VRM", hwmon_temp,
asus_wmi_ec_make_sensor_address(1, 0x00, 0x3E),
&ec->nr_registers);
}
+ switch (board) {
+ case BOARD_RS_B550_E_G:
+ case BOARD_RS_X570_E_G:
+ case BOARD_R_C8H:
+ case BOARD_R_C8DH:
+ case BOARD_R_C8F:
+ asus_wmi_ec_set_sensor_info(si++, "T_Sensor", hwmon_temp,
+ asus_wmi_ec_make_sensor_address(1, 0x00, 0x3D),
+ &ec->nr_registers);
+ }
+
switch (board) {
case BOARD_RS_X570_E_G:
case BOARD_R_C8H:
--
2.33.0
On Sun, Oct 03, 2021 at 03:33:43PM +0200, Oleksandr Natalenko wrote:
> Move `T_Sensor` addition into a separate `case` statement in preparation
> for the next patch that introduces a board without it.
>
> No functional change.
>
> Signed-off-by: Oleksandr Natalenko <[email protected]>
This patch depends on acceptance of the asus_wmi_sensors driver,
which should at least be mentioned here. The same applies to the
next patch of the series. In general, please do not send patches
for multiple drivers as single series, and please always mention
such dependencies.
Thanks,
Guenter
> ---
> drivers/hwmon/asus_wmi_sensors.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hwmon/asus_wmi_sensors.c b/drivers/hwmon/asus_wmi_sensors.c
> index 6b04fad18891..98e761861601 100644
> --- a/drivers/hwmon/asus_wmi_sensors.c
> +++ b/drivers/hwmon/asus_wmi_sensors.c
> @@ -144,14 +144,22 @@ static void asus_wmi_ec_fill_board_sensors(struct asus_wmi_ec_info *ec, int boar
> asus_wmi_ec_set_sensor_info(si++, "Motherboard", hwmon_temp,
> asus_wmi_ec_make_sensor_address(1, 0x00, 0x3C),
> &ec->nr_registers);
> - asus_wmi_ec_set_sensor_info(si++, "T_Sensor", hwmon_temp,
> - asus_wmi_ec_make_sensor_address(1, 0x00, 0x3D),
> - &ec->nr_registers);
> asus_wmi_ec_set_sensor_info(si++, "VRM", hwmon_temp,
> asus_wmi_ec_make_sensor_address(1, 0x00, 0x3E),
> &ec->nr_registers);
> }
>
> + switch (board) {
> + case BOARD_RS_B550_E_G:
> + case BOARD_RS_X570_E_G:
> + case BOARD_R_C8H:
> + case BOARD_R_C8DH:
> + case BOARD_R_C8F:
> + asus_wmi_ec_set_sensor_info(si++, "T_Sensor", hwmon_temp,
> + asus_wmi_ec_make_sensor_address(1, 0x00, 0x3D),
> + &ec->nr_registers);
> + }
> +
> switch (board) {
> case BOARD_RS_X570_E_G:
> case BOARD_R_C8H: