Skip to content

Commit

Permalink
fix: ls2k500sfb build error, gpio_device_find_by_label should be used
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeno-sole authored and MingcongBai committed Jul 2, 2024
1 parent f668247 commit 5c093d3
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/video/fbdev/ls2k500sfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,19 +283,13 @@ irqreturn_t ls2k500sfb_interrupt(int irq, void *arg)
#define GPIO_INTPOL ((void *)IO_BASE+0x1fe00000+0x510)
#define GPIO_INTEN ((void *)IO_BASE+0x1fe00000+0x514)

static int gpiochip_match_name(struct gpio_chip *chip, void *data)
{
const char *name = data;

return !strcmp(chip->label, name);
}
static int get_gpio_irq_from_acpi_table(int gpio)
{
struct gpio_chip *chip;
struct gpio_desc *desc;

chip = gpiochip_find("LOON0007:00", gpiochip_match_name);
if (!chip)
chip->gpiodev = gpio_device_find_by_label("LOON0007:00");
if (!chip->gpiodev)
return -ENOENT;
desc = gpiochip_request_own_desc(chip, gpio, "reboot", GPIO_LOOKUP_FLAGS_DEFAULT, GPIOD_IN);
if (!desc)
Expand Down

0 comments on commit 5c093d3

Please sign in to comment.