]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: rcar-vin: Remove unneeded calls to pm_runtime_{enable, disable}
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 12 Jun 2019 23:45:41 +0000 (19:45 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 21 Jun 2019 20:40:02 +0000 (16:40 -0400)
Runtime PM is already enabled unconditionally when the driver is probed
and disabled when it's removed. There is no point in doing it again for
Gen2 when opening and closing the video device.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/rcar-vin/rcar-v4l2.c

index b821ea01786eb1ffdad5e6727c04e12be7b80f07..0841f1a0bfd7ba3a3722d6f8465564e0478845e1 100644 (file)
@@ -797,8 +797,6 @@ static int rvin_initialize_device(struct file *file)
        if (ret < 0)
                return ret;
 
-       pm_runtime_enable(&vin->vdev.dev);
-
        /*
         * Try to configure with default parameters. Notice: this is the
         * very first open, so, we cannot race against other calls,
@@ -813,7 +811,6 @@ static int rvin_initialize_device(struct file *file)
 
        return 0;
 esfmt:
-       pm_runtime_disable(&vin->vdev.dev);
        rvin_power_off(vin);
 
        return ret;
@@ -863,10 +860,8 @@ static int rvin_release(struct file *file)
         * If this was the last open file.
         * Then de-initialize hw module.
         */
-       if (fh_singular) {
-               pm_runtime_disable(&vin->vdev.dev);
+       if (fh_singular)
                rvin_power_off(vin);
-       }
 
        mutex_unlock(&vin->lock);