diff mbox series

[v1,10/13] gpio: dwapb: Drop of_match_ptr() & ACPI_PTR() calls

Message ID 20200409141228.49561-11-andriy.shevchenko@linux.intel.com
State New
Headers show
Series gpio: dwapb: Clean up the driver and a fix | expand

Commit Message

Andy Shevchenko April 9, 2020, 2:12 p.m. UTC
Since we always have a table of IDs compiled in, there is no use
for of_match_ptr() nor ACPI_PTR() call. Besides that it brings
a warning (depending on configuration):

.../gpio-dwapb.c:638:34: warning: ‘dwapb_of_match’ defined but not used [-Wunused-const-variable=]
  638 | static const struct of_device_id dwapb_of_match[] = {
      |                                  ^~~~~~~~~~~~~~

Get rid of them for good.

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

Comments

Serge Semin April 15, 2020, 1:07 p.m. UTC | #1
On Thu, Apr 09, 2020 at 05:12:25PM +0300, Andy Shevchenko wrote:
> Since we always have a table of IDs compiled in, there is no use
> for of_match_ptr() nor ACPI_PTR() call. Besides that it brings
> a warning (depending on configuration):
> 
> .../gpio-dwapb.c:638:34: warning: ‘dwapb_of_match’ defined but not used [-Wunused-const-variable=]
>   638 | static const struct of_device_id dwapb_of_match[] = {
>       |                                  ^~~~~~~~~~~~~~
> 
> Get rid of them for good.

Looks good. Thanks.

Reviewed-by: Serge Semin <fancer.lancer@gmail.com>

> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/gpio/gpio-dwapb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
> index c03d856be703..5b93967a4c96 100644
> --- a/drivers/gpio/gpio-dwapb.c
> +++ b/drivers/gpio/gpio-dwapb.c
> @@ -805,8 +805,8 @@ static struct platform_driver dwapb_gpio_driver = {
>  	.driver		= {
>  		.name	= DWAPB_DRIVER_NAME,
>  		.pm	= &dwapb_gpio_pm_ops,
> -		.of_match_table = of_match_ptr(dwapb_of_match),
> -		.acpi_match_table = ACPI_PTR(dwapb_acpi_match),
> +		.of_match_table = dwapb_of_match,
> +		.acpi_match_table = dwapb_acpi_match,
>  	},
>  	.probe		= dwapb_gpio_probe,
>  	.remove		= dwapb_gpio_remove,
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
index c03d856be703..5b93967a4c96 100644
--- a/drivers/gpio/gpio-dwapb.c
+++ b/drivers/gpio/gpio-dwapb.c
@@ -805,8 +805,8 @@  static struct platform_driver dwapb_gpio_driver = {
 	.driver		= {
 		.name	= DWAPB_DRIVER_NAME,
 		.pm	= &dwapb_gpio_pm_ops,
-		.of_match_table = of_match_ptr(dwapb_of_match),
-		.acpi_match_table = ACPI_PTR(dwapb_acpi_match),
+		.of_match_table = dwapb_of_match,
+		.acpi_match_table = dwapb_acpi_match,
 	},
 	.probe		= dwapb_gpio_probe,
 	.remove		= dwapb_gpio_remove,