Skip to content

Commit bd1e336

Browse files
Heikki Krogerusgregkh
authored andcommitted
driver core: platform: Remove platform_device_add_properties()
There are no more users for it. The last place where it's called is in platform_device_register_full(). Replacing that call with device_create_managed_software_node() and removing the function. Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6d6e03d commit bd1e336

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

drivers/base/platform.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -641,22 +641,6 @@ int platform_device_add_data(struct platform_device *pdev, const void *data,
641641
}
642642
EXPORT_SYMBOL_GPL(platform_device_add_data);
643643

644-
/**
645-
* platform_device_add_properties - add built-in properties to a platform device
646-
* @pdev: platform device to add properties to
647-
* @properties: null terminated array of properties to add
648-
*
649-
* The function will take deep copy of @properties and attach the copy to the
650-
* platform device. The memory associated with properties will be freed when the
651-
* platform device is released.
652-
*/
653-
int platform_device_add_properties(struct platform_device *pdev,
654-
const struct property_entry *properties)
655-
{
656-
return device_add_properties(&pdev->dev, properties);
657-
}
658-
EXPORT_SYMBOL_GPL(platform_device_add_properties);
659-
660644
/**
661645
* platform_device_add - add a platform device to device hierarchy
662646
* @pdev: platform device we're adding
@@ -842,8 +826,8 @@ struct platform_device *platform_device_register_full(
842826
goto err;
843827

844828
if (pdevinfo->properties) {
845-
ret = platform_device_add_properties(pdev,
846-
pdevinfo->properties);
829+
ret = device_create_managed_software_node(&pdev->dev,
830+
pdevinfo->properties, NULL);
847831
if (ret)
848832
goto err;
849833
}

include/linux/platform_device.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ extern int platform_device_add_resources(struct platform_device *pdev,
197197
unsigned int num);
198198
extern int platform_device_add_data(struct platform_device *pdev,
199199
const void *data, size_t size);
200-
extern int platform_device_add_properties(struct platform_device *pdev,
201-
const struct property_entry *properties);
202200
extern int platform_device_add(struct platform_device *pdev);
203201
extern void platform_device_del(struct platform_device *pdev);
204202
extern void platform_device_put(struct platform_device *pdev);

0 commit comments

Comments
 (0)