@@ -684,9 +684,9 @@ static int rpcif_probe(struct platform_device *pdev)
const char *name;
int ret;
- flash = of_get_next_child(pdev->dev.of_node, NULL);
+ flash = of_get_next_child(dev->of_node, NULL);
if (!flash) {
- dev_warn(&pdev->dev, "no flash node found\n");
+ dev_warn(dev, "no flash node found\n");
return -ENODEV;
}
@@ -696,12 +696,12 @@ static int rpcif_probe(struct platform_device *pdev)
name = "rpc-if-hyperflash";
} else {
of_node_put(flash);
- dev_warn(&pdev->dev, "unknown flash type\n");
+ dev_warn(dev, "unknown flash type\n");
return -ENODEV;
}
of_node_put(flash);
- rpc = devm_kzalloc(&pdev->dev, sizeof(*rpc), GFP_KERNEL);
+ rpc = devm_kzalloc(dev, sizeof(*rpc), GFP_KERNEL);
if (!rpc)
return -ENOMEM;
@@ -730,9 +730,9 @@ static int rpcif_probe(struct platform_device *pdev)
vdev = platform_device_alloc(name, pdev->id);
if (!vdev)
return -ENOMEM;
- vdev->dev.parent = &pdev->dev;
+ vdev->dev.parent = dev;
- rpc->dev = &pdev->dev;
+ rpc->dev = dev;
rpc->vdev = vdev;
platform_set_drvdata(pdev, rpc);