From 5d658bfdb4ca797104f3ad9a88dae86bee0ac77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Mon, 23 Sep 2013 18:00:20 +0200 Subject: [PATCH 1/3] remoteproc/davinci: drop needless devm_clk_put MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comment above disable_irq says that it is needed to ensure that the "devm subsystem might end up releasing things before freeing the irq, thus allowing an interrupt to sneak in while the device is being removed." disable_irq is enough for this purpose and there is no need to manually free the reference to the clock. Cc: Robert Tivy Signed-off-by: Uwe Kleine-König [moved the Cc line into the commit message] Signed-off-by: Ohad Ben-Cohen --- drivers/remoteproc/da8xx_remoteproc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/remoteproc/da8xx_remoteproc.c b/drivers/remoteproc/da8xx_remoteproc.c index 129f7b997866..b91cd3086fb7 100644 --- a/drivers/remoteproc/da8xx_remoteproc.c +++ b/drivers/remoteproc/da8xx_remoteproc.c @@ -301,8 +301,6 @@ static int da8xx_rproc_remove(struct platform_device *pdev) */ disable_irq(drproc->irq); - devm_clk_put(dev, drproc->dsp_clk); - rproc_del(rproc); rproc_put(rproc); From 0ddc5ec1c1f4d776a8e702b3bcc25daa015b8de6 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Wed, 14 Aug 2013 11:11:28 +0200 Subject: [PATCH 2/3] remoteproc/davinci: simplify use of devm_ioremap_resource Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // Signed-off-by: Julia Lawall [simplify patch title] Signed-off-by: Ohad Ben-Cohen --- drivers/remoteproc/da8xx_remoteproc.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/remoteproc/da8xx_remoteproc.c b/drivers/remoteproc/da8xx_remoteproc.c index b91cd3086fb7..3841b9813109 100644 --- a/drivers/remoteproc/da8xx_remoteproc.c +++ b/drivers/remoteproc/da8xx_remoteproc.c @@ -201,23 +201,11 @@ static int da8xx_rproc_probe(struct platform_device *pdev) } bootreg_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!bootreg_res) { - dev_err(dev, - "platform_get_resource(IORESOURCE_MEM, 0): NULL\n"); - return -EADDRNOTAVAIL; - } - - chipsig_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (!chipsig_res) { - dev_err(dev, - "platform_get_resource(IORESOURCE_MEM, 1): NULL\n"); - return -EADDRNOTAVAIL; - } - bootreg = devm_ioremap_resource(dev, bootreg_res); if (IS_ERR(bootreg)) return PTR_ERR(bootreg); + chipsig_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); chipsig = devm_ioremap_resource(dev, chipsig_res); if (IS_ERR(chipsig)) return PTR_ERR(chipsig); From bd88acba5f9809af48f66267bb16024b9e33cf2b Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Mon, 12 Aug 2013 17:20:22 +0900 Subject: [PATCH 3/3] remoteproc/ste_modem: staticize local symbols These local symbols are used only in this file. Fix the following sparse warnings: drivers/remoteproc/ste_modem_rproc.c:167:27: warning: symbol 'sproc_fw_ops' was not declared. Should it be static? drivers/remoteproc/ste_modem_rproc.c:196:25: warning: symbol 'sproc_dev_cb' was not declared. Should it be static? Signed-off-by: Jingoo Han [standartize patch title] Signed-off-by: Ohad Ben-Cohen --- drivers/remoteproc/ste_modem_rproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/ste_modem_rproc.c b/drivers/remoteproc/ste_modem_rproc.c index 1ec39a4c0b3e..c4ac9104dd8e 100644 --- a/drivers/remoteproc/ste_modem_rproc.c +++ b/drivers/remoteproc/ste_modem_rproc.c @@ -164,7 +164,7 @@ sproc_find_loaded_rsc_table(struct rproc *rproc, const struct firmware *fw) } /* STE modem firmware handler operations */ -const struct rproc_fw_ops sproc_fw_ops = { +static const struct rproc_fw_ops sproc_fw_ops = { .load = sproc_load_segments, .find_rsc_table = sproc_find_rsc_table, .find_loaded_rsc_table = sproc_find_loaded_rsc_table, @@ -193,7 +193,7 @@ static void sproc_kick_callback(struct ste_modem_device *mdev, int vqid) sproc_dbg(sproc, "no message was found in vqid %d\n", vqid); } -struct ste_modem_dev_cb sproc_dev_cb = { +static struct ste_modem_dev_cb sproc_dev_cb = { .kick = sproc_kick_callback, };