Re: [PATCH v2 2/2] hwmon: (oxp-sensors) Move board detection to the init function

From: Greg KH
Date: Tue Jul 18 2023 - 09:40:26 EST


On Mon, Jul 17, 2023 at 07:25:16PM -0300, Joaquín Ignacio Aramendía wrote:
> 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@xxxxxxxxx>
> ---
> drivers/hwmon/oxp-sensors.c | 29 +++++++++++++++--------------
> 1 file changed, 15 insertions(+), 14 deletions(-)

Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>