@@ -1766,16 +1766,10 @@ MODULE_DEVICE_TABLE(of, vchiq_of_match);
static struct platform_device *
vchiq_register_child(struct platform_device *pdev, const char *name)
{
- struct platform_device_info pdevinfo;
struct platform_device *child;
- memset(&pdevinfo, 0, sizeof(pdevinfo));
-
- pdevinfo.parent = &pdev->dev;
- pdevinfo.name = name;
- pdevinfo.id = PLATFORM_DEVID_NONE;
-
- child = platform_device_register_full(&pdevinfo);
+ child = platform_device_register_data(&pdev->dev, name, PLATFORM_DEVID_NONE,
+ NULL, 0);
if (IS_ERR(child)) {
dev_warn(&pdev->dev, "%s not registered\n", name);
platform_device_put(child);
The child platform devices registered by the vchiq driver currently populates a struct platform_device_info with a name and parent device and uses platform_device_register_full() to its registration. It can be simplified by using platform_device_register_data() directly (which encapsulates populating the platform_device_info struct and a platform_device_register_full() call in itself). Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)