Skip to content

Commit

Permalink
gpio: pch: fix non-DT build
Browse files Browse the repository at this point in the history
commit 1cfadea
"gpio: pch: allow use from device tree"
makes the driver not compile unless CONFIG_OF_GPIO is set.
Fix it.

Cc: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Linus Walleij committed Dec 15, 2015
1 parent 7c20df3 commit a9f1a3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpio/gpio-pch.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ static int pch_gpio_probe(struct pci_dev *pdev,
pci_set_drvdata(pdev, chip);
spin_lock_init(&chip->spinlock);
pch_gpio_setup(chip);
#ifdef CONFIG_OF_GPIO
chip->gpio.of_node = pdev->dev.of_node;
#endif
ret = gpiochip_add(&chip->gpio);
if (ret) {
dev_err(&pdev->dev, "PCH gpio: Failed to register GPIO\n");
Expand Down

0 comments on commit a9f1a3e

Please sign in to comment.