Skip to content

Commit 1e050cd

Browse files
committed
Merge tag 'hwmon-for-v5.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon fixes from Guenter Roeck: - In the pwm-fan driver, ensure that the internal pwm state matches the state assumed by the pwm code. - Avoid EREMOTEIO errors in sht4 driver - In the nct6775 driver, make it explicit that the register value passed to nct6775_asuswmi_read() is an 8-bit value - Avoid WARNing in dell-smm driver removal after failing to create /proc/i8k - Stop using a plain integer as NULL pointer in corsair-psu driver * tag 'hwmon-for-v5.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (pwm-fan) Ensure the fan going on in .probe() hwmon: (sht4x) Fix EREMOTEIO errors hwmon: (nct6775) mask out bank number in nct6775_wmi_read_value() hwmon: (dell-smm) Fix warning on /proc/i8k creation error hwmon: (corsair-psu) fix plain integer used as NULL pointer
2 parents 257dcf2 + a2ca752 commit 1e050cd

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

drivers/hwmon/corsair-psu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ static int corsairpsu_probe(struct hid_device *hdev, const struct hid_device_id
729729
corsairpsu_check_cmd_support(priv);
730730

731731
priv->hwmon_dev = hwmon_device_register_with_info(&hdev->dev, "corsairpsu", priv,
732-
&corsairpsu_chip_info, 0);
732+
&corsairpsu_chip_info, NULL);
733733

734734
if (IS_ERR(priv->hwmon_dev)) {
735735
ret = PTR_ERR(priv->hwmon_dev);

drivers/hwmon/dell-smm-hwmon.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,10 +627,9 @@ static void __init i8k_init_procfs(struct device *dev)
627627
{
628628
struct dell_smm_data *data = dev_get_drvdata(dev);
629629

630-
/* Register the proc entry */
631-
proc_create_data("i8k", 0, NULL, &i8k_proc_ops, data);
632-
633-
devm_add_action_or_reset(dev, i8k_exit_procfs, NULL);
630+
/* Only register exit function if creation was successful */
631+
if (proc_create_data("i8k", 0, NULL, &i8k_proc_ops, data))
632+
devm_add_action_or_reset(dev, i8k_exit_procfs, NULL);
634633
}
635634

636635
#else

drivers/hwmon/nct6775.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ static u16 nct6775_wmi_read_value(struct nct6775_data *data, u16 reg)
15271527

15281528
nct6775_wmi_set_bank(data, reg);
15291529

1530-
err = nct6775_asuswmi_read(data->bank, reg, &tmp);
1530+
err = nct6775_asuswmi_read(data->bank, reg & 0xff, &tmp);
15311531
if (err)
15321532
return 0;
15331533

drivers/hwmon/pwm-fan.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,6 @@ static int pwm_fan_probe(struct platform_device *pdev)
336336
return ret;
337337
}
338338

339-
ctx->pwm_value = MAX_PWM;
340-
341339
pwm_init_state(ctx->pwm, &ctx->pwm_state);
342340

343341
/*

drivers/hwmon/sht4x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/*
2424
* I2C command delays (in microseconds)
2525
*/
26-
#define SHT4X_MEAS_DELAY 1000
26+
#define SHT4X_MEAS_DELAY_HPM 8200 /* see t_MEAS,h in datasheet */
2727
#define SHT4X_DELAY_EXTRA 10000
2828

2929
/*
@@ -90,7 +90,7 @@ static int sht4x_read_values(struct sht4x_data *data)
9090
if (ret < 0)
9191
goto unlock;
9292

93-
usleep_range(SHT4X_MEAS_DELAY, SHT4X_MEAS_DELAY + SHT4X_DELAY_EXTRA);
93+
usleep_range(SHT4X_MEAS_DELAY_HPM, SHT4X_MEAS_DELAY_HPM + SHT4X_DELAY_EXTRA);
9494

9595
ret = i2c_master_recv(client, raw_data, SHT4X_RESPONSE_LENGTH);
9696
if (ret != SHT4X_RESPONSE_LENGTH) {

0 commit comments

Comments
 (0)