Skip to content

fix: ls2k500sfb build error, gpio_device_find_by_label should be used #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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