소스 검색

hwmon: (hih6130) Fix missing hih6130->write_length setting

The hih6130->write_length setting was accidently removed by commit
ebc6b9383f3e "hwmon: (hih6130) Convert to devm_hwmon_device_register_with_groups",
fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Axel Lin 11 년 전
부모
커밋
eeeafd384f
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      drivers/hwmon/hih6130.c

+ 3 - 0
drivers/hwmon/hih6130.c

@@ -238,6 +238,9 @@ static int hih6130_probe(struct i2c_client *client,
 	hih6130->client = client;
 	hih6130->client = client;
 	mutex_init(&hih6130->lock);
 	mutex_init(&hih6130->lock);
 
 
+	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_QUICK))
+		hih6130->write_length = 1;
+
 	hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name,
 	hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name,
 							   hih6130,
 							   hih6130,
 							   hih6130_groups);
 							   hih6130_groups);