5 Jul
2017
5 Jul
'17
10:11 a.m.
On Wed, Jul 05, 2017 at 03:13:23PM +0900, Andi Shyti wrote:
- if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node)
I do not like drivers to check the Kernel's configuration, I think just checking "pdev->dev.of_node" is enough.
This idiom gets used because it allows the compiler to optimize out the DT section if the kernel is built without DT support, it's fine.