remoteproc: pru: Use rproc_of_parse_firmware() to get firmware name
PATCH 1/2 remoteproc: pru: Use rproc_of_parse_firmware() to get firmware name
There is a helper function to get the firmware name, make use of that.
Signed-off-by Andrew Davis <[email protected]>
--- drivers/remoteproc/pru_rproc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/remoteproc/pru_rproc.c +3 -5
@@ -1003,11 +1003,9 @@ static int pru_rproc_probe(struct platform_device *pdev)if (!data)return -ENODEV ; - ret =of_property_read_string (np,"firmware-name" , &fw_name); -if (ret) { -dev_err (dev,"unable to retrieve firmware-name %d\n" , ret); -return ret; - } + ret =rproc_of_parse_firmware (dev,0 , &fw_name); +if (ret) +return dev_err_probe (dev, ret,"unable to retrieve firmware-name\n" ); rproc =devm_rproc_alloc (dev, pdev->name, &pru_rproc_ops, fw_name,sizeof (*pru));
Signature · 1 line
2.39.2
PATCH 2/2 remoteproc: pru: Remove empty remove callback
The .remove() callback only prints out a debug message, remove this otherwise unneeded callback.
Signed-off-by Andrew Davis <[email protected]>
--- drivers/remoteproc/pru_rproc.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/remoteproc/pru_rproc.c +0 -9
@@ -1078,14 +1078,6 @@ static int pru_rproc_probe(struct platform_device *pdev)return 0 ; } -static void pru_rproc_remove (struct platform_device *pdev) -{ -struct device *dev = &pdev->dev; -struct rproc *rproc =platform_get_drvdata (pdev); - -dev_dbg (dev,"%s: removing rproc %s\n" , __func__, rproc->name); -} -static const struct pru_private_data pru_data = { .type =PRU_TYPE_PRU , };
@@ -1131,7 +1123,6 @@ static struct platform_driver pru_rproc_driver = { .suppress_bind_attrs = true, }, .probe = pru_rproc_probe, - .remove = pru_rproc_remove, };module_platform_driver (pru_rproc_driver);
Signature · 1 line
2.39.2
Mathieu Poirier
maintainerQuoted 7 lines · Andrew Davis
There is a helper function to get the firmware name, make use of that.
Signed-off-by Andrew Davis <[email protected]>--- drivers/remoteproc/pru_rproc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
... and this one too.
Quoted 22 lines
drivers/remoteproc/pru_rproc.c +3
-5@@ -1003,11 +1003,9 @@ static int pru_rproc_probe(struct platform_device *pdev)if (!data)return -ENODEV ; - ret =of_property_read_string (np,"firmware-name" , &fw_name); -if (ret) { -dev_err (dev,"unable to retrieve firmware-name %d\n" , ret); -return ret; - } + ret =rproc_of_parse_firmware (dev,0 , &fw_name); +if (ret) +return dev_err_probe (dev, ret,"unable to retrieve firmware-name\n" ); rproc =devm_rproc_alloc (dev, pdev->name, &pru_rproc_ops, fw_name,sizeof (*pru));Signature · 1 line
2.39.2