]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
hwmon: (nct6775-i2c) Use i2c_get_match_data()
authorRob Herring <robh@kernel.org>
Wed, 15 Nov 2023 20:57:01 +0000 (14:57 -0600)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 11 Dec 2023 14:20:28 +0000 (06:20 -0800)
commit10a0575ea09dbc333ee952b707ea216020d8f77c
tree15764de1d2ef100521a1297631631a8a69997dd7
parent5cfc392cc93b42d5b0bdea12eecb649887b9991d
hwmon: (nct6775-i2c) Use i2c_get_match_data()

Use preferred i2c_get_match_data() instead of of_match_device() and
i2c_match_id() to get the driver match data. With this, adjust the
includes to explicitly include the correct headers.

Adjust the 'kinds' enum to not use 0, so that no match data can be
distinguished from a valid enum value.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231115205703.3730448-2-robh@kernel.org
[groeck: Use double cast for i2c_get_match_data() to make clang happy]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/nct6775-i2c.c
drivers/hwmon/nct6775.h