These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.
This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240430085654.1028864-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Currently the local variable hum is being divided by a constant and
the results is being re-assigned back to hum before the value is being
returned to the caller. The assignment to hum is redundant and can
be removed.
Cleans up clang scan build warning:
drivers/hwmon/hs3001.c:65:9: warning: Although the value stored to 'hum'
is used in the enclosing expression, the value is never actually read
from 'hum' [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20231023135828.667297-1-colin.i.king@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add base support for Renesas HS3001 temperature
and humidity sensors and its compatibles HS3002,
HS3003 and HS3004.
The sensor has a fix I2C address 0x44. The resolution
is fixed to 14bit (ref. Missing feature).
Missing feature:
- Accessing non-volatile memory: Custom board has no
possibility to control voltage supply of sensor. Thus,
we cannot send the necessary control commands within
the first 10ms after power-on.
Signed-off-by: Andre Werner <andre.werner@systec-electronic.com>
Link: https://lore.kernel.org/r/20230725042207.22310-2-andre.werner@systec-electronic.com
[groeck: Cosmetic documentation fixup; added documentation to index;
replaced probe_new with probe dropped unused variable]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>