Skip to content

Commit

Permalink
Revert "gpio/omap: fix build error when OF_GPIO is not defined."
Browse files Browse the repository at this point in the history
This reverts commit 949eb1a.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Linus Walleij committed Jul 30, 2013
1 parent 5ae90d8 commit 27d470c
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions drivers/gpio/gpio-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,18 +1037,6 @@ omap_mpuio_alloc_gc(struct gpio_bank *bank, unsigned int irq_start,
IRQ_NOREQUEST | IRQ_NOPROBE, 0);
}

#if defined(CONFIG_OF_GPIO)
static inline bool omap_gpio_chip_boot_dt(struct gpio_chip *chip)
{
return chip->of_node != NULL;
}
#else
static inline bool omap_gpio_chip_boot_dt(struct gpio_chip *chip)
{
return false;
}
#endif

static void omap_gpio_chip_init(struct gpio_bank *bank)
{
int j;
Expand Down Expand Up @@ -1089,7 +1077,7 @@ static void omap_gpio_chip_init(struct gpio_bank *bank)
* irq_create_of_mapping() only for the GPIO lines that
* are used as interrupts.
*/
if (!omap_gpio_chip_boot_dt(&bank->chip))
if (!bank->chip.of_node)
for (j = 0; j < bank->width; j++)
irq_create_mapping(bank->domain, j);
irq_set_chained_handler(bank->irq, gpio_irq_handler);
Expand Down Expand Up @@ -1125,7 +1113,7 @@ static int omap_gpio_irq_map(struct irq_domain *d, unsigned int virq,
* but until then this has to be done on a per driver
* basis. Remove this once this is managed by the core.
*/
if (omap_gpio_chip_boot_dt(&bank->chip)) {
if (bank->chip.of_node) {
gpio = irq_to_gpio(bank, hwirq);
ret = gpio_request_one(gpio, GPIOF_IN, NULL);
if (ret) {
Expand Down

0 comments on commit 27d470c

Please sign in to comment.