diff mbox series

[v1,3/5] gpio: pca953x: Drop unneeded ACPI_PTR()

Message ID 20200520211916.25727-3-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1,1/5] gpiolib: acpi: Introduce opaque data field for quirks | expand

Commit Message

Andy Shevchenko May 20, 2020, 9:19 p.m. UTC
ACPI_PTR() becomes a no-op when !CONFIG_ACPI. This is not needed since
we always have ID table enabled. Moreover, in the mentioned case compiler
will complain about defined but not used variable.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpio-pca953x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko May 25, 2020, 5:58 p.m. UTC | #1
On Thu, May 21, 2020 at 12:19:14AM +0300, Andy Shevchenko wrote:
> ACPI_PTR() becomes a no-op when !CONFIG_ACPI. This is not needed since
> we always have ID table enabled. Moreover, in the mentioned case compiler
> will complain about defined but not used variable.

Bart, are you going to apply this one, or should I resend it as a part of v2?

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/gpio/gpio-pca953x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
> index 4bb3d3524bc7..1fca8dd7824f 100644
> --- a/drivers/gpio/gpio-pca953x.c
> +++ b/drivers/gpio/gpio-pca953x.c
> @@ -1176,7 +1176,7 @@ static struct i2c_driver pca953x_driver = {
>  		.name	= "pca953x",
>  		.pm	= &pca953x_pm_ops,
>  		.of_match_table = pca953x_dt_ids,
> -		.acpi_match_table = ACPI_PTR(pca953x_acpi_ids),
> +		.acpi_match_table = pca953x_acpi_ids,
>  	},
>  	.probe		= pca953x_probe,
>  	.remove		= pca953x_remove,
> -- 
> 2.26.2
>
Bartosz Golaszewski May 27, 2020, 1:13 p.m. UTC | #2
pon., 25 maj 2020 o 19:58 Andy Shevchenko
<andriy.shevchenko@linux.intel.com> napisał(a):
>
> On Thu, May 21, 2020 at 12:19:14AM +0300, Andy Shevchenko wrote:
> > ACPI_PTR() becomes a no-op when !CONFIG_ACPI. This is not needed since
> > we always have ID table enabled. Moreover, in the mentioned case compiler
> > will complain about defined but not used variable.
>
> Bart, are you going to apply this one, or should I resend it as a part of v2?
>

Ugh, I already sent my last PRs to Linus both for v5.7 fixes & v5.8
updates. I'll let Linus pick it up once he pulls from my tree.

Bart
Andy Shevchenko May 27, 2020, 1:38 p.m. UTC | #3
On Wed, May 27, 2020 at 03:13:11PM +0200, Bartosz Golaszewski wrote:
> pon., 25 maj 2020 o 19:58 Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> napisał(a):
> >
> > On Thu, May 21, 2020 at 12:19:14AM +0300, Andy Shevchenko wrote:
> > > ACPI_PTR() becomes a no-op when !CONFIG_ACPI. This is not needed since
> > > we always have ID table enabled. Moreover, in the mentioned case compiler
> > > will complain about defined but not used variable.
> >
> > Bart, are you going to apply this one, or should I resend it as a part of v2?
> >
> 
> Ugh, I already sent my last PRs to Linus both for v5.7 fixes & v5.8
> updates. I'll let Linus pick it up once he pulls from my tree.

No problem, thanks!

P.S. The patch is pretty much independent and can be applied even before that
(I suppose), but let Linus decide what is better for him.
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 4bb3d3524bc7..1fca8dd7824f 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -1176,7 +1176,7 @@  static struct i2c_driver pca953x_driver = {
 		.name	= "pca953x",
 		.pm	= &pca953x_pm_ops,
 		.of_match_table = pca953x_dt_ids,
-		.acpi_match_table = ACPI_PTR(pca953x_acpi_ids),
+		.acpi_match_table = pca953x_acpi_ids,
 	},
 	.probe		= pca953x_probe,
 	.remove		= pca953x_remove,