]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hwmon: (pmbus/max31785) fix argument type for i2c_smbus_write_byte_data wrapper
authorSanman Pradhan <psanman@juniper.net>
Sat, 7 Mar 2026 22:45:19 +0000 (14:45 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 31 Mar 2026 02:45:06 +0000 (19:45 -0700)
The local wrapper max31785_i2c_write_byte_data() declares its data
parameter as u16 but passes it directly to i2c_smbus_write_byte_data()
which takes u8. Fix the type to match the underlying API.

No functional change; all current callers pass values that fit in u8.

Signed-off-by: Sanman Pradhan <psanman@juniper.net>
Link: https://lore.kernel.org/r/20260307224517.38316-2-sanman.p211993@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/max31785.c

index 1f94d38a163719d73d25044d2269ae91f045d448..50073fe0c5e888dd6c9689f3ca66b82d9a87f5be 100644 (file)
@@ -55,7 +55,7 @@ static inline void max31785_wait(const struct max31785_data *data)
 
 static int max31785_i2c_write_byte_data(struct i2c_client *client,
                                        struct max31785_data *driver_data,
-                                       int command, u16 data)
+                                       int command, u8 data)
 {
        int rc;