From eeeafd384f2f1709d48ba00c807e86d4890cf6b5 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Wed, 6 Aug 2014 08:06:50 +0800 Subject: 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 Signed-off-by: Guenter Roeck --- drivers/hwmon/hih6130.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hwmon/hih6130.c b/drivers/hwmon/hih6130.c index 0e01c4e13e33..7b73d2002d3e 100644 --- a/drivers/hwmon/hih6130.c +++ b/drivers/hwmon/hih6130.c @@ -238,6 +238,9 @@ static int hih6130_probe(struct i2c_client *client, hih6130->client = client; 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, hih6130, hih6130_groups); -- cgit v1.2.3