Re: linux-next: build failure after merge of the gpio tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 4, 2013 at 2:45 AM, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:

> After merging the gpio tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/gpio/gpio-stmpe.c: In function 'stmpe_gpio_irq_init':
> drivers/gpio/gpio-stmpe.c:313:23: error: 'struct gpio_chip' has no member named 'of_node'
> drivers/gpio/gpio-stmpe.c:316:61: error: 'struct gpio_chip' has no member named 'of_node'
> drivers/gpio/gpio-stmpe.c: In function 'stmpe_gpio_probe':
> drivers/gpio/gpio-stmpe.c:351:18: error: 'struct gpio_chip' has no member named 'of_node'

So basically when I look at this issue the way we have
the of node optional in gpiolib is inconsistent with the device
core and that makes it easy to do things like this :-(

include/linux/device.h:
struct device {
(...)
         struct device_node      *of_node; /* associated device tree node */
(...)
}

No #ifdef, it used to be there but I guess we deleted it because
of #ifdef clutter elsewhere.

include/asm-generic/gpio.h:
struct gpio_chip {
(...)
#if defined(CONFIG_OF_GPIO)
        /*
         * If CONFIG_OF is enabled, then all GPIO controllers described in the
         * device tree automatically may have an OF translation
         */
        struct device_node *of_node;
        int of_gpio_n_cells;
        int (*of_xlate)(struct gpio_chip *gc,
                        const struct of_phandle_args *gpiospec, u32 *flags);
#endif
(...)
}

Will it help if we just move the of_node outside of the #ifdef
in this case? Or does it have hard deps such that the
of_gpio_n_cells and of_xlate also need to be moved out
in that case?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux