Re: [PATCH v3 1/2] gpio: designware: switch device node to fwnode

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

 



On Sat, Feb 27, 2016 at 9:15 AM, Jiang Qiu <qiujiang@xxxxxxxxxx> wrote:

>>>>> -       node = dev->of_node;
>>>>> -       if (!IS_ENABLED(CONFIG_OF_GPIO) || !node)
>>>>> +       if (!IS_ENABLED(CONFIG_OF_GPIO) || !(dev->of_node))
>>>>>                 return ERR_PTR(-ENODEV);
>>>>
>>>> So, since you converted to fwnode, do you still need this check?
>>>>
>>> Although this patch coverted device node to fwnode, only DTs binding was
>>> supported here, and patch2 support ACPI will remove this check.
>>
>> Yes, but like I said below device_get_child_node_count() will take
>> care of that, will it?
> Right, device_get_child_node_count() will take of it, this should be removed.
>>
>>>>>
>>>>> -       nports = of_get_child_count(node);
>>>>> +       nports = device_get_child_node_count(dev);
>>>>>         if (nports == 0)
>>>>>                 return ERR_PTR(-ENODEV);
>>>>
>>>> ...I think this one fail if it will not found any child.
>>> This one fail? yes, it will return to failure.
>>> I am not very clear here.
>>
>> See above.
> Here, device_get_child_node_count will return ZERO if there is not any child.
> So, I think this will work ok, will it?

I didn't check deeply, but I assume so.


-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux