aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/am437x/am437x-vpfe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/am437x/am437x-vpfe.c')
-rw-r--r--drivers/media/platform/am437x/am437x-vpfe.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
index 601ae6487617..b05738a95e55 100644
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
@@ -2586,8 +2586,10 @@ static int vpfe_probe(struct platform_device *pdev)
pm_runtime_put_sync(&pdev->dev);
- vpfe->sd = devm_kzalloc(&pdev->dev, sizeof(struct v4l2_subdev *) *
- ARRAY_SIZE(vpfe->cfg->asd), GFP_KERNEL);
+ vpfe->sd = devm_kcalloc(&pdev->dev,
+ ARRAY_SIZE(vpfe->cfg->asd),
+ sizeof(struct v4l2_subdev *),
+ GFP_KERNEL);
if (!vpfe->sd) {
ret = -ENOMEM;
goto probe_out_v4l2_unregister;
@@ -2662,8 +2664,7 @@ static void vpfe_save_context(struct vpfe_ccdc *ccdc)
static int vpfe_suspend(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct vpfe_device *vpfe = platform_get_drvdata(pdev);
+ struct vpfe_device *vpfe = dev_get_drvdata(dev);
struct vpfe_ccdc *ccdc = &vpfe->ccdc;
/* if streaming has not started we don't care */
@@ -2720,8 +2721,7 @@ static void vpfe_restore_context(struct vpfe_ccdc *ccdc)
static int vpfe_resume(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct vpfe_device *vpfe = platform_get_drvdata(pdev);
+ struct vpfe_device *vpfe = dev_get_drvdata(dev);
struct vpfe_ccdc *ccdc = &vpfe->ccdc;
/* if streaming has not started we don't care */