mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
driver core: update kerneldoc for platform_device_alloc()
Users of platform_device_alloc() + platform_device_add() must not modify certain fields of the dynamically created platform device object. Update the kernel doc to say which fields are affected and which functions to use. Suggested-by: Manuel Ebner <manuelebner@mailbox.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260706-pdev-fwnode-ref-v3-5-1ff028e33779@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5b84ef0b02
commit
67e1ddc9f7
|
|
@ -619,6 +619,13 @@ static void platform_device_release_full(struct device *dev)
|
|||
*
|
||||
* Create a platform device object which can have other objects attached
|
||||
* to it, and which will have attached objects freed when it is released.
|
||||
*
|
||||
* The following fields of the dynamically allocated platform device must not
|
||||
* be modified manually: resource, num_resources, dev.platform_data,
|
||||
* dev.of_node and dev.fwnode. Users wishing to do the split platform device
|
||||
* registration with platform_device_alloc() + platform_device_add() are
|
||||
* required to use dedicated helpers for adding resources, platform data or
|
||||
* assigning firmware nodes.
|
||||
*/
|
||||
struct platform_device *platform_device_alloc(const char *name, int id)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user