hwmon: (oxp-sensors) Move board detection to the init function
authorJoaquín Ignacio Aramendía <samsagax@gmail.com>
Mon, 17 Jul 2023 22:25:16 +0000 (19:25 -0300)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 21 Aug 2023 13:04:29 +0000 (06:04 -0700)
commit49ffb5eefebccf498fb2a45b46ff58d0b255bf97
tree0ede76cb334d535f36c4893e65e55e441da12f69
parent3b7f4bde06daaff391a374fc27c8163b2847de34
hwmon: (oxp-sensors) Move board detection to the init function

Move detection logic to the start of init() function so we won't
instantiate the driver if the board is not compatible.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20230717222526.229984-3-samsagax@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/oxp-sensors.c