From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Cc: <linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, <linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> Subject: [PATCH] spi: ti-qspi: improve ->remove() callback Date: Thu, 29 Oct 2015 08:57:30 -0500 [thread overview] Message-ID: <1446127050-5957-1-git-send-email-balbi@ti.com> (raw) there's no need to call pm_runtime_get_sync() followed by pm_runtime_put(). We should, instead, just call pm_runtime_put_sync() and pm_runtime_disable(). Signed-off-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> --- drivers/spi/spi-ti-qspi.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 69c1a95b0615..64318fcfacf2 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -554,16 +554,7 @@ free_master: static int ti_qspi_remove(struct platform_device *pdev) { - struct ti_qspi *qspi = platform_get_drvdata(pdev); - int ret; - - ret = pm_runtime_get_sync(qspi->dev); - if (ret < 0) { - dev_err(qspi->dev, "pm_runtime_get_sync() failed\n"); - return ret; - } - - pm_runtime_put(qspi->dev); + pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); return 0; -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> Subject: [PATCH] spi: ti-qspi: improve ->remove() callback Date: Thu, 29 Oct 2015 08:57:30 -0500 [thread overview] Message-ID: <1446127050-5957-1-git-send-email-balbi@ti.com> (raw) there's no need to call pm_runtime_get_sync() followed by pm_runtime_put(). We should, instead, just call pm_runtime_put_sync() and pm_runtime_disable(). Signed-off-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> --- drivers/spi/spi-ti-qspi.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 69c1a95b0615..64318fcfacf2 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -554,16 +554,7 @@ free_master: static int ti_qspi_remove(struct platform_device *pdev) { - struct ti_qspi *qspi = platform_get_drvdata(pdev); - int ret; - - ret = pm_runtime_get_sync(qspi->dev); - if (ret < 0) { - dev_err(qspi->dev, "pm_runtime_get_sync() failed\n"); - return ret; - } - - pm_runtime_put(qspi->dev); + pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); return 0; -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2015-10-29 13:57 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-10-29 13:57 Felipe Balbi [this message] 2015-10-29 13:57 ` [PATCH] spi: ti-qspi: improve ->remove() callback Felipe Balbi [not found] ` <1446127050-5957-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org> 2015-11-02 14:52 ` Grygorii Strashko 2015-11-02 14:52 ` Grygorii Strashko [not found] ` <563778B8.9060109-l0cyMroinI0@public.gmane.org> 2015-11-02 15:20 ` Felipe Balbi 2015-11-02 15:20 ` Felipe Balbi [not found] ` <87bnbcctsk.fsf-HgARHv6XitJaoMGHk7MhZQC/G2K4zDHf@public.gmane.org> 2015-11-02 15:43 ` Grygorii Strashko 2015-11-02 15:43 ` Grygorii Strashko [not found] ` <56378492.702-l0cyMroinI0@public.gmane.org> 2015-11-02 16:06 ` Felipe Balbi 2015-11-02 16:06 ` Felipe Balbi [not found] ` <87si4oo07n.fsf-HgARHv6XitJaoMGHk7MhZQC/G2K4zDHf@public.gmane.org> 2015-11-02 19:19 ` Grygorii Strashko 2015-11-02 19:19 ` Grygorii Strashko [not found] ` <5637B74D.5040807-l0cyMroinI0@public.gmane.org> 2015-11-02 19:25 ` Felipe Balbi 2015-11-02 19:25 ` Felipe Balbi
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1446127050-5957-1-git-send-email-balbi@ti.com \ --to=balbi-l0cymroini0@public.gmane.org \ --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \ --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.