Re: [PATCH 4/4] CP2112 Devicetree Support

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

 



On 31/01/2023 02:06, Daniel Kaehn wrote:
> On Sun, Jan 29, 2023 at 5:06 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@xxxxxxxxxx> wrote:
>>
>> On 28/01/2023 21:26, Danny Kaehn wrote:
>>> +#if defined(CONFIG_OF_GPIO)
>>
>> Don't use #if, but IS_ENABLED(). I think it should work here.
> 
> I think I will still need to use an #if / some sort of preprocessor directive,
> since of_node is only a member of the gpio_chip struct if that is enabled
> (and thus causes a compile error if done outside of the preprocessor)...
> Unless I'm misinterpreting your comment?

If of_node in gpio_chip is indeed hidden by #ifdef, then the code is ok.

Best regards,
Krzysztof




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux