Commit 1e050cd5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'hwmon-for-v5.16-rc5' of...

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
parents 257dcf29 a2ca7520
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+3 −4
Original line number Diff line number Diff line
@@ -627,9 +627,8 @@ 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);

	/* 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);
}

+1 −1
Original line number Diff line number Diff line
@@ -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;

+0 −2
Original line number Diff line number Diff line
@@ -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);

	/*
+2 −2
Original line number Diff line number Diff line
@@ -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) {