Commit 8516529e authored by Wolfram Sang's avatar Wolfram Sang Committed by Mauro Carvalho Chehab

media: platform: am437x: simplify getting .drvdata

We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 62d4cfd3
...@@ -2662,8 +2662,7 @@ static void vpfe_save_context(struct vpfe_ccdc *ccdc) ...@@ -2662,8 +2662,7 @@ static void vpfe_save_context(struct vpfe_ccdc *ccdc)
static int vpfe_suspend(struct device *dev) static int vpfe_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct vpfe_device *vpfe = dev_get_drvdata(dev);
struct vpfe_device *vpfe = platform_get_drvdata(pdev);
struct vpfe_ccdc *ccdc = &vpfe->ccdc; struct vpfe_ccdc *ccdc = &vpfe->ccdc;
/* if streaming has not started we don't care */ /* if streaming has not started we don't care */
...@@ -2720,8 +2719,7 @@ static void vpfe_restore_context(struct vpfe_ccdc *ccdc) ...@@ -2720,8 +2719,7 @@ static void vpfe_restore_context(struct vpfe_ccdc *ccdc)
static int vpfe_resume(struct device *dev) static int vpfe_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct vpfe_device *vpfe = dev_get_drvdata(dev);
struct vpfe_device *vpfe = platform_get_drvdata(pdev);
struct vpfe_ccdc *ccdc = &vpfe->ccdc; struct vpfe_ccdc *ccdc = &vpfe->ccdc;
/* if streaming has not started we don't care */ /* if streaming has not started we don't care */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment