@@ -169,11 +169,9 @@ EXPORT_SYMBOL(of_device_alloc);
* Returns pointer to created platform device, or NULL if a device was not
* registered. Unavailable devices will not get registered.
*/
-static struct platform_device *of_platform_device_create_pdata(
- struct device_node *np,
- const char *bus_id,
- void *platform_data,
- struct device *parent)
+struct platform_device *
+of_platform_device_create_pdata(struct device_node *np, const char *bus_id,
+ void *platform_data, struct device *parent)
{
struct platform_device *dev;
@@ -203,6 +201,7 @@ static struct platform_device *of_platform_device_create_pdata(
of_node_clear_flag(np, OF_POPULATED);
return NULL;
}
+EXPORT_SYMBOL(of_platform_device_create_pdata);
/**
* of_platform_device_create - Alloc, initialize and register an of_device
@@ -70,6 +70,9 @@ extern int of_platform_device_destroy(struct device *dev, void *data);
extern int of_platform_bus_probe(struct device_node *root,
const struct of_device_id *matches,
struct device *parent);
+extern struct platform_device *
+of_platform_device_create_pdata(struct device_node *np, const char *bus_id,
+ void *platform_data, struct device *parent);
#ifdef CONFIG_OF_ADDRESS
extern int of_platform_populate(struct device_node *root,
const struct of_device_id *matches,
Export of_platform_device_create_pdata() to be used by drivers to create child devices with the given platform data. This can be used by platform specific driver to send platform data core driver. For e.g., this will be used by TI's J721E SoC specific PCIe driver to send ->start_link() ops and ->is_link_up() ops to Cadence core PCIe driver. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> --- drivers/of/platform.c | 9 ++++----- include/linux/of_platform.h | 3 +++ 2 files changed, 7 insertions(+), 5 deletions(-) -- 2.17.1