* [PATCH next 15/25] media: platform: Use dev_get_drvdata()
[not found] <20190423075020.173734-1-wangkefeng.wang@huawei.com>
@ 2019-04-23 7:50 ` Kefeng Wang
2019-05-24 12:58 ` Mauro Carvalho Chehab
2019-04-23 7:50 ` [PATCH next 22/25] media: staging/imx7: " Kefeng Wang
1 sibling, 1 reply; 4+ messages in thread
From: Kefeng Wang @ 2019-04-23 7:50 UTC (permalink / raw)
To: linux-kernel
Cc: Masahiro Yamada, Kefeng Wang, Mauro Carvalho Chehab,
Benson Leung, Enric Balletbo i Serra, linux-media
Using dev_get_drvdata directly.
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Benson Leung <bleung@chromium.org>
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
drivers/media/platform/cros-ec-cec/cros-ec-cec.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
index 7bc4d8a9af28..2e218c7a3a1f 100644
--- a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
+++ b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
@@ -174,8 +174,7 @@ static const struct cec_adap_ops cros_ec_cec_ops = {
#ifdef CONFIG_PM_SLEEP
static int cros_ec_cec_suspend(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(&pdev->dev);
+ struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(dev);
if (device_may_wakeup(dev))
enable_irq_wake(cros_ec_cec->cros_ec->irq);
@@ -185,8 +184,7 @@ static int cros_ec_cec_suspend(struct device *dev)
static int cros_ec_cec_resume(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(&pdev->dev);
+ struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(dev);
if (device_may_wakeup(dev))
disable_irq_wake(cros_ec_cec->cros_ec->irq);
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH next 22/25] media: staging/imx7: Use dev_get_drvdata()
[not found] <20190423075020.173734-1-wangkefeng.wang@huawei.com>
2019-04-23 7:50 ` [PATCH next 15/25] media: platform: Use dev_get_drvdata() Kefeng Wang
@ 2019-04-23 7:50 ` Kefeng Wang
2019-04-23 8:34 ` Rui Miguel Silva
1 sibling, 1 reply; 4+ messages in thread
From: Kefeng Wang @ 2019-04-23 7:50 UTC (permalink / raw)
To: linux-kernel
Cc: Masahiro Yamada, Kefeng Wang, Rui Miguel Silva, Steve Longerbeam,
Philipp Zabel, NXP Linux Team, linux-media
Using dev_get_drvdata directly.
Cc: Rui Miguel Silva <rmfrfs@gmail.com>
Cc: Steve Longerbeam <slongerbeam@gmail.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
drivers/staging/media/imx/imx7-mipi-csis.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
index 6cae2960eea1..19455f425416 100644
--- a/drivers/staging/media/imx/imx7-mipi-csis.c
+++ b/drivers/staging/media/imx/imx7-mipi-csis.c
@@ -1027,8 +1027,7 @@ static int mipi_csis_probe(struct platform_device *pdev)
static int mipi_csis_pm_suspend(struct device *dev, bool runtime)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev);
+ struct v4l2_subdev *mipi_sd = dev_get_drvdata(dev);
struct csi_state *state = mipi_sd_to_csis_state(mipi_sd);
int ret = 0;
@@ -1052,8 +1051,7 @@ static int mipi_csis_pm_suspend(struct device *dev, bool runtime)
static int mipi_csis_pm_resume(struct device *dev, bool runtime)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev);
+ struct v4l2_subdev *mipi_sd = dev_get_drvdata(dev);
struct csi_state *state = mipi_sd_to_csis_state(mipi_sd);
int ret = 0;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH next 22/25] media: staging/imx7: Use dev_get_drvdata()
2019-04-23 7:50 ` [PATCH next 22/25] media: staging/imx7: " Kefeng Wang
@ 2019-04-23 8:34 ` Rui Miguel Silva
0 siblings, 0 replies; 4+ messages in thread
From: Rui Miguel Silva @ 2019-04-23 8:34 UTC (permalink / raw)
To: Kefeng Wang
Cc: linux-kernel, Masahiro Yamada, Steve Longerbeam, Philipp Zabel,
NXP Linux Team, linux-media
Hi Kefeng,
Thanks for the patch.
On Tue 23 Apr 2019 at 08:50, Kefeng Wang wrote:
> Using dev_get_drvdata directly.
>
> Cc: Rui Miguel Silva <rmfrfs@gmail.com>
There was already a patch sent by Wolfram that does the same thing
[0].
Thanks anyway.
---
Cheers,
Rui
[0]: https://lore.kernel.org/linux-media/20190319163622.30607-1-wsa+renesas@sang-engineering.com/
> Cc: Steve Longerbeam <slongerbeam@gmail.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> drivers/staging/media/imx/imx7-mipi-csis.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
> index 6cae2960eea1..19455f425416 100644
> --- a/drivers/staging/media/imx/imx7-mipi-csis.c
> +++ b/drivers/staging/media/imx/imx7-mipi-csis.c
> @@ -1027,8 +1027,7 @@ static int mipi_csis_probe(struct platform_device *pdev)
>
> static int mipi_csis_pm_suspend(struct device *dev, bool runtime)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev);
> + struct v4l2_subdev *mipi_sd = dev_get_drvdata(dev);
> struct csi_state *state = mipi_sd_to_csis_state(mipi_sd);
> int ret = 0;
>
> @@ -1052,8 +1051,7 @@ static int mipi_csis_pm_suspend(struct device *dev, bool runtime)
>
> static int mipi_csis_pm_resume(struct device *dev, bool runtime)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev);
> + struct v4l2_subdev *mipi_sd = dev_get_drvdata(dev);
> struct csi_state *state = mipi_sd_to_csis_state(mipi_sd);
> int ret = 0;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH next 15/25] media: platform: Use dev_get_drvdata()
2019-04-23 7:50 ` [PATCH next 15/25] media: platform: Use dev_get_drvdata() Kefeng Wang
@ 2019-05-24 12:58 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2019-05-24 12:58 UTC (permalink / raw)
To: Kefeng Wang
Cc: linux-kernel, Masahiro Yamada, Benson Leung,
Enric Balletbo i Serra, linux-media
Em Tue, 23 Apr 2019 15:50:10 +0800
Kefeng Wang <wangkefeng.wang@huawei.com> escreveu:
> Using dev_get_drvdata directly.
Patch looks ok to me. Assuming that this will be applied via some
other tree:
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Benson Leung <bleung@chromium.org>
> Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> drivers/media/platform/cros-ec-cec/cros-ec-cec.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
> index 7bc4d8a9af28..2e218c7a3a1f 100644
> --- a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
> +++ b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
> @@ -174,8 +174,7 @@ static const struct cec_adap_ops cros_ec_cec_ops = {
> #ifdef CONFIG_PM_SLEEP
> static int cros_ec_cec_suspend(struct device *dev)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(&pdev->dev);
> + struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(dev);
>
> if (device_may_wakeup(dev))
> enable_irq_wake(cros_ec_cec->cros_ec->irq);
> @@ -185,8 +184,7 @@ static int cros_ec_cec_suspend(struct device *dev)
>
> static int cros_ec_cec_resume(struct device *dev)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(&pdev->dev);
> + struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(dev);
>
> if (device_may_wakeup(dev))
> disable_irq_wake(cros_ec_cec->cros_ec->irq);
Thanks,
Mauro
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-24 12:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20190423075020.173734-1-wangkefeng.wang@huawei.com>
2019-04-23 7:50 ` [PATCH next 15/25] media: platform: Use dev_get_drvdata() Kefeng Wang
2019-05-24 12:58 ` Mauro Carvalho Chehab
2019-04-23 7:50 ` [PATCH next 22/25] media: staging/imx7: " Kefeng Wang
2019-04-23 8:34 ` Rui Miguel Silva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).