From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEA27C04E53 for ; Thu, 16 May 2019 01:48:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 81FE120873 for ; Thu, 16 May 2019 01:48:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726927AbfEPBqh (ORCPT ); Wed, 15 May 2019 21:46:37 -0400 Received: from vsp-unauthed02.binero.net ([195.74.38.227]:38162 "EHLO vsp-unauthed02.binero.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726928AbfEPBPF (ORCPT ); Wed, 15 May 2019 21:15:05 -0400 X-Halon-ID: 074218d5-7778-11e9-8ab4-005056917a89 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id 074218d5-7778-11e9-8ab4-005056917a89; Thu, 16 May 2019 03:15:01 +0200 (CEST) From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= To: Laurent Pinchart , Ulrich Hecht , linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Ulrich Hecht Subject: [PATCH v2 2/8] rcar-vin: Remove unneeded calls to pm_runtime_{enable,disable} Date: Thu, 16 May 2019 03:14:11 +0200 Message-Id: <20190516011417.10590-3-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190516011417.10590-1-niklas.soderlund+renesas@ragnatech.se> References: <20190516011417.10590-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org 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 Reviewed-by: Ulrich Hecht --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c index b821ea01786eb1ff..0841f1a0bfd7ba3a 100644 --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c @@ -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); -- 2.21.0