Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp621069pxy; Wed, 28 Apr 2021 10:37:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRUAw56DxUYyJJpoy0d3PriL1nQW1jg9cZxfwpRTQFjYOw8CPLUNARKUK2Hwlq5RmlkIo+ X-Received: by 2002:a17:906:8319:: with SMTP id j25mr23875871ejx.413.1619631381457; Wed, 28 Apr 2021 10:36:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619631381; cv=none; d=google.com; s=arc-20160816; b=TjUqclnLAYE8MdXdgKjBp/UpyGC/5e2i59aLh965uyGyacTTW/OYq0BRwTYhEGH8q7 leOghgzFyASdkXKPi6jkGuFBAR1rGVpcV83+2IClLLRgzxwTI80mDQCsyDpsWhyzvuJS +S7LObxL1kmK6fG1uS6hg3h4l7wgCTYz1TH8QZybfWr3u9W16yZvmufIm741baOp0uDp PkMY9OcQstdwrHG5qBRN5LP2Pv1l2ALxgDb37l+/Q3iR3GTLXrJxq+uwdoxI2Yg+7q1v 4FnIEAYpkeoOZA4dtmq2rsgOy2TiolpMd09zk05xCuDNZYcwNY+B9JptqG4xT3bvEVhs zDmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=AnB7NyVeQtVTFGeGuY2Y6iQtWT9mpoxNQf7Q+2FPcTM=; b=RZaNIPRBx2g7PaPga9uJA58zNHEjloC6tbrdIKd9uONFVJhJoDC4+beil1yLxkIJaQ 2+d8YrI5UFoKYSufmuNrCBnt3Rdtkvo3vxZb4O9ZTfnLAL1G6+zzNzrymquD4fxjyOw/ rf1usg8BXlHAdr96iy3qgXZjYI5ovNAKTmuXZwADCEKsMV4syq9MFVgGRbvAnaR8qVBT 7c6pbZcA6T7R/deClBkbjlKnKjSveCjy4rmNN+qLjcZM2EeLfnovtJx9iU69hyj9InRO /TlzWXsz2nsAYVaDSZGpBN7OxKMUKDLonDZ/yCcWTvvfNdbzEMsa3Nj0HLAPr2LwI43T cfpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=N6119slb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c24si358799edx.325.2021.04.28.10.35.58; Wed, 28 Apr 2021 10:36:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=N6119slb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238516AbhD1O5i (ORCPT + 99 others); Wed, 28 Apr 2021 10:57:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:36738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240400AbhD1Oxs (ORCPT ); Wed, 28 Apr 2021 10:53:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9882D6192C; Wed, 28 Apr 2021 14:52:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619621565; bh=Z5Yp+Q0q2yqOayRyZCcv1BilN9Ip1CW26ivzhLbxUjE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N6119slbKp7xKpHK7jY2N8QjZug1qcVWXOfLByFNNeGoy3Vj3JMny2WxtD3OXQZoe rNwfv3MIW+m4EAbkrPp/7C2duKZV0SMWzp00ls4/aXYbJzf4ILmBzgnv3OSRMXptP1 ZMpgf5x9q6W1XIaYKYJiQq7Az7WcT2yJl1E9zIX/9sPSUgckGx7jXJzO75mqUfgubL 71QkdB7FU4/t66ILdDfb+Q0CQVdhLaghByNUq0tSSWG2IgezZsDbcs5OFUvoI9TPxk 5x0CA8cav47vhS4QFCvVvpj+dbNhxfyXYYGQcj8k0fBH85+IPu+HrzihfwHzzsmxWa ILJ4mlCf07p0A== Received: by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1lblYR-001Dsd-DE; Wed, 28 Apr 2021 16:52:43 +0200 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Ezequiel Garcia , Hans Verkuil , Krzysztof Kozlowski , Mauro Carvalho Chehab , Sylwester Nawrocki , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v4 63/79] media: exynos-gsc: use pm_runtime_resume_and_get() Date: Wed, 28 Apr 2021 16:52:24 +0200 Message-Id: <31bdadf2f59e86c6a315ec390b44c6c681af6647.1619621413.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/exynos-gsc/gsc-m2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c b/drivers/media/platform/exynos-gsc/gsc-m2m.c index 27a3c92c73bc..09551e96ac15 100644 --- a/drivers/media/platform/exynos-gsc/gsc-m2m.c +++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c @@ -58,7 +58,7 @@ static int gsc_m2m_start_streaming(struct vb2_queue *q, unsigned int count) struct gsc_ctx *ctx = q->drv_priv; int ret; - ret = pm_runtime_get_sync(&ctx->gsc_dev->pdev->dev); + ret = pm_runtime_resume_and_get(&ctx->gsc_dev->pdev->dev); return ret > 0 ? 0 : ret; } -- 2.30.2