Re: i2c: Include GPIO consumer header in main include

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

 



On Mon, Jan 15, 2018 at 7:03 PM, Wolfram Sang <wsa@xxxxxxxxxxxxx> wrote:
> On Fri, Dec 08, 2017 at 02:39:34PM +0100, Linus Walleij wrote:
>> It seems most users of <linux/i2c.h> pick up their
>> dependency of <linux/gpio/consumer.h> from other paths but
>> that is not a universal law, so include the header
>> explicitly so we have struct gpio_desc available.
>>
>> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
>
> I still think drivers needing GPIO should include it explicitly.
> So, NAK until further arguments arrive...

What I mean is that they must be doing that currently since this
file uses struct gpio_desc (for recovert), else the build would fail.

So that is why I think it should be made explicit.

Another option is to just forward-declare struct gpio_desc;

Yours,
Linus Walleij



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux