From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, Bingbu Cao <bingbu.cao@intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Mauro Carvalho Chehab <mchehab@kernel.org>, Sakari Ailus <sakari.ailus@linux.intel.com>, Tianshu Qiu <tian.shu.qiu@intel.com>, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, Jonathan Cameron <Jonathan.Cameron@huawei.com> Subject: [PATCH v5 03/25] staging: media: ipu3: use pm_runtime_resume_and_get() Date: Thu, 6 May 2021 17:25:41 +0200 [thread overview] Message-ID: <a32caa4bce0341ab99a4440a431b4aebd55f8498.1620314616.git.mchehab+huawei@kernel.org> (raw) In-Reply-To: <cover.1620314616.git.mchehab+huawei@kernel.org> Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> --- drivers/staging/media/ipu3/ipu3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/ipu3/ipu3.c b/drivers/staging/media/ipu3/ipu3.c index ee1bba6bdcac..8e1e9e46e604 100644 --- a/drivers/staging/media/ipu3/ipu3.c +++ b/drivers/staging/media/ipu3/ipu3.c @@ -392,10 +392,9 @@ int imgu_s_stream(struct imgu_device *imgu, int enable) } /* Set Power */ - r = pm_runtime_get_sync(dev); + r = pm_runtime_resume_and_get(dev); if (r < 0) { dev_err(dev, "failed to set imgu power\n"); - pm_runtime_put(dev); return r; } -- 2.30.2
WARNING: multiple messages have this Message-ID (diff)
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> To: unlisted-recipients:; (no To-header on input) Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, Bingbu Cao <bingbu.cao@intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Mauro Carvalho Chehab <mchehab@kernel.org>, Sakari Ailus <sakari.ailus@linux.intel.com>, Tianshu Qiu <tian.shu.qiu@intel.com>, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, Jonathan Cameron <Jonathan.Cameron@huawei.com> Subject: [PATCH v5 03/25] staging: media: ipu3: use pm_runtime_resume_and_get() Date: Thu, 6 May 2021 17:25:41 +0200 [thread overview] Message-ID: <a32caa4bce0341ab99a4440a431b4aebd55f8498.1620314616.git.mchehab+huawei@kernel.org> (raw) In-Reply-To: <cover.1620314616.git.mchehab+huawei@kernel.org> Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> --- drivers/staging/media/ipu3/ipu3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/ipu3/ipu3.c b/drivers/staging/media/ipu3/ipu3.c index ee1bba6bdcac..8e1e9e46e604 100644 --- a/drivers/staging/media/ipu3/ipu3.c +++ b/drivers/staging/media/ipu3/ipu3.c @@ -392,10 +392,9 @@ int imgu_s_stream(struct imgu_device *imgu, int enable) } /* Set Power */ - r = pm_runtime_get_sync(dev); + r = pm_runtime_resume_and_get(dev); if (r < 0) { dev_err(dev, "failed to set imgu power\n"); - pm_runtime_put(dev); return r; } -- 2.30.2
next prev parent reply other threads:[~2021-05-06 15:26 UTC|newest] Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-06 15:25 [PATCH v5 00/25] media: use pm_runtime_resume_and_get() on non-i2c drivers Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 01/25] staging: media: imx7-mipi-csis: use pm_runtime_resume_and_get() Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 02/25] staging: media: atomisp: " Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab [this message] 2021-05-06 15:25 ` [PATCH v5 03/25] staging: media: ipu3: " Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 04/25] staging: media: cedrus_video: " Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 05/25] staging: media: tegra-vde: " Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-07 5:13 ` Dan Carpenter 2021-05-10 12:26 ` Dmitry Osipenko 2021-05-06 15:25 ` [PATCH v5 06/25] staging: media: tegra-video: " Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 07/25] media: rockchip/rga: " Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-13 22:38 ` Heiko Stuebner 2021-05-13 22:38 ` Heiko Stuebner 2021-05-13 22:38 ` Heiko Stuebner 2021-05-06 15:25 ` [PATCH v5 08/25] media: sti/hva: " Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 09/25] media: ipu3: " Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 10/25] media: coda: " Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 11/25] media: mtk-jpeg: " Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 12/25] media: camss: " Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 13/25] media: venus: core: " Mauro Carvalho Chehab 2021-05-10 13:54 ` Stanimir Varbanov 2021-05-17 15:26 ` Stanimir Varbanov 2021-05-18 15:20 ` Mauro Carvalho Chehab 2021-05-18 15:49 ` Stanimir Varbanov 2021-05-06 15:25 ` [PATCH v5 14/25] media: venus: vdec: " Mauro Carvalho Chehab 2021-05-10 13:55 ` Stanimir Varbanov 2021-05-06 15:25 ` [PATCH v5 15/25] media: venus: venc: " Mauro Carvalho Chehab 2021-05-10 13:55 ` Stanimir Varbanov 2021-05-06 15:25 ` [PATCH v5 16/25] media: rcar-fcp: " Mauro Carvalho Chehab 2021-05-06 16:05 ` Laurent Pinchart 2021-05-06 15:25 ` [PATCH v5 17/25] media: rkisp1: " Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-13 22:27 ` Heiko Stuebner 2021-05-13 22:27 ` Heiko Stuebner 2021-05-13 22:27 ` Heiko Stuebner 2021-05-06 15:25 ` [PATCH v5 18/25] media: s3c-camif: " Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 19/25] media: s5p-mfc: " Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 20/25] media: stm32: " Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` [PATCH v5 21/25] media: sunxi: " Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:25 ` Mauro Carvalho Chehab 2021-05-06 15:26 ` [PATCH v5 22/25] media: ti-vpe: " Mauro Carvalho Chehab 2021-05-06 15:26 ` [PATCH v5 23/25] media: vsp1: " Mauro Carvalho Chehab 2021-05-06 16:06 ` Laurent Pinchart 2021-05-06 15:26 ` [PATCH v5 24/25] media: rcar-vin: " Mauro Carvalho Chehab 2021-05-06 15:26 ` [PATCH v5 25/25] media: hantro: " Mauro Carvalho Chehab 2021-05-06 15:26 ` Mauro Carvalho Chehab 2021-05-06 15:26 ` Mauro Carvalho Chehab
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=a32caa4bce0341ab99a4440a431b4aebd55f8498.1620314616.git.mchehab+huawei@kernel.org \ --to=mchehab+huawei@kernel.org \ --cc=Jonathan.Cameron@huawei.com \ --cc=bingbu.cao@intel.com \ --cc=gregkh@linuxfoundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=linux-staging@lists.linux.dev \ --cc=linuxarm@huawei.com \ --cc=mauro.chehab@huawei.com \ --cc=mchehab@kernel.org \ --cc=sakari.ailus@linux.intel.com \ --cc=tian.shu.qiu@intel.com \ /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.