[PATCH v3 1/9] firmware: arm_scmi: Set fwnode for the generated SCMI platform device
Bartosz Golaszewski
brgl at kernel.org
Thu Sep 3 02:16:42 PDT 2026
On Thu, 3 Sep 2026 01:26:42 +0200, Jonathan Cameron
<jonathan.cameron at oss.qualcomm.com> said:
>>
>> How about something like this instead of above 2 lines:
>>
>> if (is_of_node(dev_fwnode(dev)))
>> platform_device_set_of_node_from_dev(spdev, dev);
>> else
>> platform_device_set_fwnode(spdev, dev_fwnode(dev));
>>
>
> To me, if the reference counting is useful (and I'm a bit doubtful about that)
> platform_device_set_fwnode() should be doing it. +CC those who might have
> more insight on this.
>
I should have that insight. platform_device_set_fwnode() *does* the reference
counting but it should be used for platform devices created with
platform_device_alloc().
Bart
More information about the linux-arm-kernel
mailing list