diff mbox series

[4/8] platform/x86: x86-android-tablets: Remove invalid_aei_gpiochip support

Message ID 20230909141816.58358-5-hdegoede@redhat.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series x86-android-tablets: Stop using gpiolib private APIs | expand

Commit Message

Hans de Goede Sept. 9, 2023, 2:18 p.m. UTC
x86_dev_info.invalid_aei_gpiochip is no longer used by any boards
and the x86-android-tablets code should not use the gpiolib private
acpi_gpiochip_free_interrupts() function.

Reported-by: Bartosz Golaszewski <brgl@bgdev.pl>
Closes: https://lore.kernel.org/platform-driver-x86/20230905185309.131295-12-brgl@bgdev.pl/
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/platform/x86/x86-android-tablets/core.c   | 15 ---------------
 .../x86/x86-android-tablets/x86-android-tablets.h |  1 -
 2 files changed, 16 deletions(-)

Comments

Andy Shevchenko Sept. 10, 2023, 7:56 a.m. UTC | #1
On Sat, Sep 9, 2023 at 5:18 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> x86_dev_info.invalid_aei_gpiochip is no longer used by any boards
> and the x86-android-tablets code should not use the gpiolib private
> acpi_gpiochip_free_interrupts() function.

Shouldn't this patch remove the private header inclusion as well?
Andy Shevchenko Sept. 10, 2023, 7:57 a.m. UTC | #2
On Sun, Sep 10, 2023 at 10:56 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Sat, Sep 9, 2023 at 5:18 PM Hans de Goede <hdegoede@redhat.com> wrote:
> >
> > x86_dev_info.invalid_aei_gpiochip is no longer used by any boards
> > and the x86-android-tablets code should not use the gpiolib private
> > acpi_gpiochip_free_interrupts() function.
>
> Shouldn't this patch remove the private header inclusion as well?

Ah, it seems it uses more than that...
diff mbox series

Patch

diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c
index 2fd6060a31bb..ab8cf22ac5da 100644
--- a/drivers/platform/x86/x86-android-tablets/core.c
+++ b/drivers/platform/x86/x86-android-tablets/core.c
@@ -259,7 +259,6 @@  static __init int x86_android_tablet_init(void)
 {
 	const struct x86_dev_info *dev_info;
 	const struct dmi_system_id *id;
-	struct gpio_chip *chip;
 	int i, ret = 0;
 
 	id = dmi_first_match(x86_android_tablet_ids);
@@ -268,20 +267,6 @@  static __init int x86_android_tablet_init(void)
 
 	dev_info = id->driver_data;
 
-	/*
-	 * The broken DSDTs on these devices often also include broken
-	 * _AEI (ACPI Event Interrupt) handlers, disable these.
-	 */
-	if (dev_info->invalid_aei_gpiochip) {
-		chip = gpiochip_find(dev_info->invalid_aei_gpiochip,
-				     gpiochip_find_match_label);
-		if (!chip) {
-			pr_err("error cannot find GPIO chip %s\n", dev_info->invalid_aei_gpiochip);
-			return -ENODEV;
-		}
-		acpi_gpiochip_free_interrupts(chip);
-	}
-
 	/*
 	 * Since this runs from module_init() it cannot use -EPROBE_DEFER,
 	 * instead pre-load any modules which are listed as requirements.
diff --git a/drivers/platform/x86/x86-android-tablets/x86-android-tablets.h b/drivers/platform/x86/x86-android-tablets/x86-android-tablets.h
index e46e1128acc8..bf97fb84c0d4 100644
--- a/drivers/platform/x86/x86-android-tablets/x86-android-tablets.h
+++ b/drivers/platform/x86/x86-android-tablets/x86-android-tablets.h
@@ -66,7 +66,6 @@  struct x86_gpio_button {
 };
 
 struct x86_dev_info {
-	char *invalid_aei_gpiochip;
 	const char * const *modules;
 	const struct software_node *bat_swnode;
 	struct gpiod_lookup_table * const *gpiod_lookup_tables;