From nobody Sat May 10 05:47:26 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1620314816; cv=none; d=zohomail.com; s=zohoarc; b=luTKiEV/cfinfg3wGbKL3l2pMF3PKQ48+gCnIgmM7pJcCnaMSoaJoXrmgvOQ5sZq3IqVykS9jq6UBE8FtmML4ixE6l2JHtb+Hfq77zI3YFlqo7gtmIdHmdjHAmeSczV9624ilzehYjk98yuR//9RDOdUzFhCvUMULi9QCqi33QU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620314816; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UuREguUnWtJMEbW22CUBV5mbM3OEKqZjCmRLeRWME90=; b=hOWdfTp8wM7HrH+/5AH7GAuzaXw/DwJ5M1zl9Y4sCksJwENc9sEGWiGOyH6caPzyLRblfm0lpulUyKROQuB2YCiUktZAni0LGqEsyRz7h1H8fN82T+JDx4Zk3KRi8yf+pCz1FWWEZZqD1zcCUfRdTBJOwms0yx3cpLRKxxE8Qeo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 1620314816782692.0618885184756; Thu, 6 May 2021 08:26:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235238AbhEFP1r (ORCPT ); Thu, 6 May 2021 11:27:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:40278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235349AbhEFP1V (ORCPT ); Thu, 6 May 2021 11:27:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7B75661922; Thu, 6 May 2021 15:26:23 +0000 (UTC) Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1left8-000SCF-92; Thu, 06 May 2021 17:26:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620314783; bh=GlCvanyZeZRx9KVkDMbg84X3Nl/epjQxFII8vak4mR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SczDGoVSUqwH5SFEk5OOp94u7cVZf7I+09IWLlfBEG5J4XBhTmgF1CnPo3WNRpBZN IaKyZ+scWvdbl4zjSO9DcL2P8lxI2PSIPsZvShJ0bWSZAJu+kGq8a5CkDmjuQpIbP9 8TWf0dU9zCgk8l1tXdfXfRq2wavnfXytqlL8RNbLqoZCBWYHUc524/5G1070IQq2Xb 9qDa3or5xfH7anhAokS+kPvNFz8yYsQKT0yk1YE9+G0bJuh7lfBaF83GsV24G9Uwmq DNRbdjSVZZl68TYukqJ+TUP3iQ0jj5ViQ/iKiTDfHJQYaoED1I2VV/fga5ioxb3trI 0YU5gyYqfzqiQ== From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Andrzej Hajda , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH v5 19/25] media: s5p-mfc: use pm_runtime_resume_and_get() Date: Thu, 6 May 2021 17:25:57 +0200 Message-Id: <1f7bfc6a99e3d63217599588452638f364ed096c.1620314616.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal wi= th 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/s5p-mfc/s5p_mfc_pm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c b/drivers/media/pl= atform/s5p-mfc/s5p_mfc_pm.c index 62d2320a7218..88b7d33c9197 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c @@ -78,11 +78,9 @@ int s5p_mfc_power_on(void) { int i, ret =3D 0; =20 - ret =3D pm_runtime_get_sync(pm->device); - if (ret < 0) { - pm_runtime_put_noidle(pm->device); + ret =3D pm_runtime_resume_and_get(pm->device); + if (ret < 0) return ret; - } =20 /* clock control */ for (i =3D 0; i < pm->num_clocks; i++) { --=20 2.30.2