]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
hwmon: (lm25066) Use i2c_get_match_data()
authorRob Herring <robh@kernel.org>
Wed, 15 Nov 2023 20:57:02 +0000 (14:57 -0600)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 11 Dec 2023 14:21:00 +0000 (06:21 -0800)
commitac0c26bae662138eac9b49215e505b402f7e80e3
treecaf2b4ae1715421820807e59e6ed5b5573c117ae
parent2792fc8f8c834e035b09be42d445085bd8bcac7e
hwmon: (lm25066) 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 'chips' 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-3-robh@kernel.org
[groeck: Use double cast for enum chips assignment to make compiler happy]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/lm25066.c