[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ec48188f-0978-431c-9771-7bda97210c81@roeck-us.net>
Date: Sun, 12 Mar 2023 14:12:37 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Jean Delvare <jdelvare@...e.com>,
Eric Tremblay <etremblay@...tech-controls.com>,
linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] hwmon: gpio-fan: drop of_match_ptr for ID table
On Sun, Mar 12, 2023 at 08:37:22PM +0100, Krzysztof Kozlowski wrote:
> The driver can match only via the DT table so the table should be always
> used and the of_match_ptr does not have any sense (this also allows ACPI
> matching via PRP0001, even though it might not be relevant here). This
> also fixes !CONFIG_OF error:
>
> drivers/hwmon/gpio-fan.c:484:34: error: ‘of_gpio_fan_match’ defined but not used [-Werror=unused-const-variable=]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Applied, though I added a note describing that the above build error can
only be seen if the OF -> GPIO_OF dependency is broken.
Thanks,
Guenter
> ---
>
> Changes since v1:
> 1. Rework patch and commit msg - drop of_match_ptr.
> ---
> drivers/hwmon/gpio-fan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
> index e75db6f64e8c..d92c536be9af 100644
> --- a/drivers/hwmon/gpio-fan.c
> +++ b/drivers/hwmon/gpio-fan.c
> @@ -586,7 +586,7 @@ static struct platform_driver gpio_fan_driver = {
> .driver = {
> .name = "gpio-fan",
> .pm = pm_sleep_ptr(&gpio_fan_pm),
> - .of_match_table = of_match_ptr(of_gpio_fan_match),
> + .of_match_table = of_gpio_fan_match,
> },
> };
>
Powered by blists - more mailing lists