media: vimc: replace vimc->pdev.dev with vimc->mdev.dev
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Wed, 22 Jan 2020 16:01:46 +0000 (17:01 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 5 Mar 2020 21:41:41 +0000 (22:41 +0100)
replace 'vimc->pdev.dev' with 'vimc->mdev.dev'
in debug prints and in assignment to
vimc_ent_device.dev. This helps to unify the debug
statements. This will also eliminate the need to use
the pdev field in vimc_device in future patch.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/vimc/vimc-capture.c
drivers/media/platform/vimc/vimc-core.c
drivers/media/platform/vimc/vimc-debayer.c
drivers/media/platform/vimc/vimc-scaler.c
drivers/media/platform/vimc/vimc-sensor.c

index 0615aa4..85da53d 100644 (file)
@@ -423,7 +423,7 @@ struct vimc_ent_device *vimc_cap_add(struct vimc_device *vimc,
 
        ret = vb2_queue_init(q);
        if (ret) {
-               dev_err(&vimc->pdev.dev, "%s: vb2 queue init failed (err=%d)\n",
+               dev_err(vimc->mdev.dev, "%s: vb2 queue init failed (err=%d)\n",
                        vcfg_name, ret);
                goto err_clean_m_ent;
        }
@@ -443,7 +443,7 @@ struct vimc_ent_device *vimc_cap_add(struct vimc_device *vimc,
        vcap->ved.ent = &vcap->vdev.entity;
        vcap->ved.process_frame = vimc_cap_process_frame;
        vcap->ved.vdev_get_format = vimc_cap_get_format;
-       vcap->ved.dev = &vimc->pdev.dev;
+       vcap->ved.dev = vimc->mdev.dev;
 
        /* Initialize the video_device struct */
        vdev = &vcap->vdev;
@@ -462,7 +462,7 @@ struct vimc_ent_device *vimc_cap_add(struct vimc_device *vimc,
        /* Register the video_device with the v4l2 and the media framework */
        ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
        if (ret) {
-               dev_err(&vimc->pdev.dev, "%s: video register failed (err=%d)\n",
+               dev_err(vimc->mdev.dev, "%s: video register failed (err=%d)\n",
                        vcap->vdev.name, ret);
                goto err_release_queue;
        }
index 97a272f..51c89fc 100644 (file)
@@ -162,12 +162,12 @@ static int vimc_add_subdevs(struct vimc_device *vimc)
        unsigned int i;
 
        for (i = 0; i < vimc->pipe_cfg->num_ents; i++) {
-               dev_dbg(&vimc->pdev.dev, "new entity for %s\n",
+               dev_dbg(vimc->mdev.dev, "new entity for %s\n",
                        vimc->pipe_cfg->ents[i].name);
                vimc->ent_devs[i] = vimc->pipe_cfg->ents[i].add(vimc,
                                        vimc->pipe_cfg->ents[i].name);
                if (!vimc->ent_devs[i]) {
-                       dev_err(&vimc->pdev.dev, "add new entity for %s\n",
+                       dev_err(vimc->mdev.dev, "add new entity for %s\n",
                                vimc->pipe_cfg->ents[i].name);
                        return -EINVAL;
                }
index 5d1b67d..34b98b2 100644 (file)
@@ -569,7 +569,7 @@ struct vimc_ent_device *vimc_deb_add(struct vimc_device *vimc,
                goto err_free_hdl;
 
        vdeb->ved.process_frame = vimc_deb_process_frame;
-       vdeb->ved.dev = &vimc->pdev.dev;
+       vdeb->ved.dev = vimc->mdev.dev;
        vdeb->mean_win_size = vimc_deb_ctrl_mean_win_size.def;
 
        /* Initialize the frame format */
index e2e551b..cb2dc24 100644 (file)
@@ -512,7 +512,7 @@ struct vimc_ent_device *vimc_sca_add(struct vimc_device *vimc,
        }
 
        vsca->ved.process_frame = vimc_sca_process_frame;
-       vsca->ved.dev = &vimc->pdev.dev;
+       vsca->ved.dev = vimc->mdev.dev;
 
        /* Initialize the frame format */
        vsca->sink_fmt = sink_fmt_default;
index 32380f5..9788fe2 100644 (file)
@@ -370,7 +370,7 @@ struct vimc_ent_device *vimc_sen_add(struct vimc_device *vimc,
                goto err_free_tpg;
 
        vsen->ved.process_frame = vimc_sen_process_frame;
-       vsen->ved.dev = &vimc->pdev.dev;
+       vsen->ved.dev = vimc->mdev.dev;
 
        /* Initialize the frame format */
        vsen->mbus_format = fmt_default;