hwmon fixes for v5.16-rc5
- 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 -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAmGzuzMACgkQyx8mb86f mYFA7xAAo9Bt0sjsRqgu9ZD+0cC6wKQV6HVkq1Gd5CnvG/gnS98/Yog7AGdpvGdp x4FssJ8Xgr6CZJfAwZA2koX60aEyl/VT7QORFZdeg0yhUHNxnU9W/INH7OZ2Bs3q n+ceE1MHFyyesRgqD9mrMEiiOodQxOch2RmGpXercYyVfpZciPL5ITYVcwS0xU1C ESCSi5bQGxfgw3lcH92fDFrmtXYBwxNYbq19qJvzRlT9bqvxUjyQD69Mxl/yKfev NXUFizBAMmXbe7d7Uqg3HKWQzLfyz7FCIor37suclYoiWY/Nn4Fx8oBLq7PuYf51 7/jFX2xCB/GZFz5zjDj/83/Kxj9KR2yyHu1IyWqBGhGGQlFTiu11m308CIBJpKL8 LkoIt9N95oyDI66YEDrxDRQvx+uW35igMlxRmk+E4WQLwJcOdfpEFHkvMAey3/D5 qYybXKMRQ/UlNSzpgDJSpUFu34RdaJJczYi68yCpCVy30PbTLL+8jLUW5RhrS6H4 g6Rupx0ggJFWPs2gIjgoA0ERaoW7pO9BKmqxqbSdafje5xzYUngiXxsAc9qSl5fI p8Gzq4tQNogvC35SFJKjjtJy8m43fKxPFD4O6ShwZYn5i7J+ugm9Q75U4hcCCeeQ hW0tNC6aK17NJE2F/RkWVnE9nWpwKULeRDTUqLJuvP3pVZJVyXQ= =Fjl2 -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
1e050cd539
@ -729,7 +729,7 @@ static int corsairpsu_probe(struct hid_device *hdev, const struct hid_device_id
|
||||
corsairpsu_check_cmd_support(priv);
|
||||
|
||||
priv->hwmon_dev = hwmon_device_register_with_info(&hdev->dev, "corsairpsu", priv,
|
||||
&corsairpsu_chip_info, 0);
|
||||
&corsairpsu_chip_info, NULL);
|
||||
|
||||
if (IS_ERR(priv->hwmon_dev)) {
|
||||
ret = PTR_ERR(priv->hwmon_dev);
|
||||
|
@ -627,10 +627,9 @@ static void __init i8k_init_procfs(struct device *dev)
|
||||
{
|
||||
struct dell_smm_data *data = dev_get_drvdata(dev);
|
||||
|
||||
/* Register the proc entry */
|
||||
proc_create_data("i8k", 0, NULL, &i8k_proc_ops, data);
|
||||
|
||||
devm_add_action_or_reset(dev, i8k_exit_procfs, NULL);
|
||||
/* Only register exit function if creation was successful */
|
||||
if (proc_create_data("i8k", 0, NULL, &i8k_proc_ops, data))
|
||||
devm_add_action_or_reset(dev, i8k_exit_procfs, NULL);
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -1527,7 +1527,7 @@ static u16 nct6775_wmi_read_value(struct nct6775_data *data, u16 reg)
|
||||
|
||||
nct6775_wmi_set_bank(data, reg);
|
||||
|
||||
err = nct6775_asuswmi_read(data->bank, reg, &tmp);
|
||||
err = nct6775_asuswmi_read(data->bank, reg & 0xff, &tmp);
|
||||
if (err)
|
||||
return 0;
|
||||
|
||||
|
@ -336,8 +336,6 @@ static int pwm_fan_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ctx->pwm_value = MAX_PWM;
|
||||
|
||||
pwm_init_state(ctx->pwm, &ctx->pwm_state);
|
||||
|
||||
/*
|
||||
|
@ -23,7 +23,7 @@
|
||||
/*
|
||||
* I2C command delays (in microseconds)
|
||||
*/
|
||||
#define SHT4X_MEAS_DELAY 1000
|
||||
#define SHT4X_MEAS_DELAY_HPM 8200 /* see t_MEAS,h in datasheet */
|
||||
#define SHT4X_DELAY_EXTRA 10000
|
||||
|
||||
/*
|
||||
@ -90,7 +90,7 @@ static int sht4x_read_values(struct sht4x_data *data)
|
||||
if (ret < 0)
|
||||
goto unlock;
|
||||
|
||||
usleep_range(SHT4X_MEAS_DELAY, SHT4X_MEAS_DELAY + SHT4X_DELAY_EXTRA);
|
||||
usleep_range(SHT4X_MEAS_DELAY_HPM, SHT4X_MEAS_DELAY_HPM + SHT4X_DELAY_EXTRA);
|
||||
|
||||
ret = i2c_master_recv(client, raw_data, SHT4X_RESPONSE_LENGTH);
|
||||
if (ret != SHT4X_RESPONSE_LENGTH) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user