usb: dwc3: rockchip: fix possible circular deadlock
[firefly-linux-kernel-4.4.55.git] / drivers / hwmon / hih6130.c
index 0e01c4e13e3350f586d2f85e469d372a4c1af636..7b73d2002d3ef19ed2f3d9a042b51c346d2f979c 100644 (file)
@@ -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);