diff --git a/drivers/of/platform.c b/drivers/of/platform.c index f011f57f835afd8edc9960e426b52671366f680b..a01f57c9e34eab8a95306b0a2643d26d2d764a1c 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -183,9 +183,8 @@ static struct platform_device *of_platform_device_create_pdata( dev->dev.bus = &platform_bus_type; dev->dev.platform_data = platform_data; of_dma_configure(&dev->dev, dev->dev.of_node); - dev->name = dev_name(&dev->dev); - if (platform_device_add(dev) != 0) { + if (of_device_add(dev) != 0) { of_dma_deconfigure(&dev->dev); platform_device_put(dev); goto err_clear_flag;