diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-07-06 14:44:16 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-10 16:07:09 +0200 |
| commit | 5b84ef0b029eb488c6a8fd83eea37010ac63b5e1 (patch) | |
| tree | e2d7a905ac3d74ca45242d2ca25baca3a14e6173 /include | |
| parent | 8877c06885ce43780f7630973dc47cd3a625524b (diff) | |
| download | linux-5b84ef0b029eb488c6a8fd83eea37010ac63b5e1.tar.gz linux-5b84ef0b029eb488c6a8fd83eea37010ac63b5e1.zip | |
driver core: platform: provide platform_device_set_of_node_from_dev()
Provide a platform-specific variant of device_set_of_node_from_dev(). In
addition to bumping the reference count of the OF node being assigned,
it also assigns the fwnode of the platform device.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260706-pdev-fwnode-ref-v3-4-1ff028e33779@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/platform_device.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index c463d46b7b9a..94b8d2b46e91 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h @@ -268,6 +268,8 @@ void platform_device_set_of_node(struct platform_device *pdev, struct device_node *np); void platform_device_set_fwnode(struct platform_device *pdev, struct fwnode_handle *fwnode); +void platform_device_set_of_node_from_dev(struct platform_device *pdev, + const struct device *dev2); extern int platform_device_add(struct platform_device *pdev); extern void platform_device_del(struct platform_device *pdev); extern void platform_device_put(struct platform_device *pdev); |
