Skip to content
/ linux Public

Commit 603607e

Browse files
andy-shevbrgl
authored andcommitted
gpio: mlxbf2: Drop wrong use of ACPI_PTR()
ACPI_PTR() is more harmful than helpful. For example, in this case if CONFIG_ACPI=n, the ID table left unused which is not what we want. Instead of adding ifdeffery here and there, drop ACPI_PTR() and replace acpi.h with mod_devicetable.h. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Asmaa Mnehi <asmaa@nvidia.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
1 parent dabe57c commit 603607e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpio/gpio-mlxbf2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// SPDX-License-Identifier: GPL-2.0
22

3-
#include <linux/acpi.h>
43
#include <linux/bitfield.h>
54
#include <linux/bitops.h>
65
#include <linux/device.h>
76
#include <linux/gpio/driver.h>
87
#include <linux/io.h>
98
#include <linux/ioport.h>
109
#include <linux/kernel.h>
10+
#include <linux/mod_devicetable.h>
1111
#include <linux/module.h>
1212
#include <linux/platform_device.h>
1313
#include <linux/pm.h>
@@ -314,7 +314,7 @@ MODULE_DEVICE_TABLE(acpi, mlxbf2_gpio_acpi_match);
314314
static struct platform_driver mlxbf2_gpio_driver = {
315315
.driver = {
316316
.name = "mlxbf2_gpio",
317-
.acpi_match_table = ACPI_PTR(mlxbf2_gpio_acpi_match),
317+
.acpi_match_table = mlxbf2_gpio_acpi_match,
318318
.pm = &mlxbf2_pm_ops,
319319
},
320320
.probe = mlxbf2_gpio_probe,

0 commit comments

Comments
 (0)