From patchwork Mon Jan 27 11:37:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13951247 X-Patchwork-Delegate: geert@linux-m68k.org Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E6AB1FECCD for ; Mon, 27 Jan 2025 11:37:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737977873; cv=none; b=f5VzLzhT3HdkLbGwXhDCfbpGKLPTudLnol+v+3z+CCBSt5u4rnzuA1W2HxgBE3dcRAoK+7YJ6E9M15JA9vncPmIsaZnQMeX8P6ChHUtA3pYD4B5/5qEv6UjIREKxCIs0cOd7ZzVRof6zp4gYkjwyAe9CvAhfRjBhMkhFQ7ciEnE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737977873; c=relaxed/simple; bh=vvhhNmJ7JnncN3IH8Bfe+4DKsW9/AtiaICDXAvgNApo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Wvl6AR09ekZJp95WyqRFDSHyiLG2DL4hgF1NQR3zJ+SYUmQ9y3LiMg/iiS+uhF1b/CYxUTYFxaFSh6oOjTtaBjuoD1Z31ewcJ4dCInlzzIlluZV0hPki7sSVi5e9u7RlRkFDWof9K0g2hYHcYJAYXZkyxLVgl1DyHjEFNIah9/w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-CSE-ConnectionGUID: 65QK8hO6RSqH0Dv7Y1T6rA== X-CSE-MsgGUID: fgsWO7PSQAu36FGINmujgA== Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 27 Jan 2025 20:37:48 +0900 Received: from localhost.localdomain (unknown [10.226.94.28]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 5B1A341F25A5; Mon, 27 Jan 2025 20:37:43 +0900 (JST) From: Biju Das To: Thomas Gleixner , Philipp Zabel Cc: Biju Das , Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH v2 05/12] irqchip/renesas-rzv2h: Simplify rzv2h_icu_init() Date: Mon, 27 Jan 2025 11:37:00 +0000 Message-ID: <20250127113723.24479-6-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250127113723.24479-1-biju.das.jz@bp.renesas.com> References: <20250127113723.24479-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Simplify rzv2h_icu_init() by using devm_pm_runtime_enable(). Signed-off-by: Biju Das --- v2: * New patch. --- drivers/irqchip/irq-renesas-rzv2h.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rzv2h.c b/drivers/irqchip/irq-renesas-rzv2h.c index 5c5d2e015a88..f90652013082 100644 --- a/drivers/irqchip/irq-renesas-rzv2h.c +++ b/drivers/irqchip/irq-renesas-rzv2h.c @@ -463,11 +463,16 @@ static int rzv2h_icu_init(struct device_node *node, struct device_node *parent) goto put_dev; } - pm_runtime_enable(&pdev->dev); + ret = devm_pm_runtime_enable(&pdev->dev); + if (ret < 0) { + dev_err(&pdev->dev, "devm_pm_runtime_enable failed, %d\n", ret); + goto put_dev; + } + ret = pm_runtime_resume_and_get(&pdev->dev); if (ret < 0) { dev_err(&pdev->dev, "pm_runtime_resume_and_get failed: %d\n", ret); - goto pm_disable; + goto put_dev; } raw_spin_lock_init(&rzv2h_icu_data->lock); @@ -488,8 +493,6 @@ static int rzv2h_icu_init(struct device_node *node, struct device_node *parent) pm_put: pm_runtime_put(&pdev->dev); -pm_disable: - pm_runtime_disable(&pdev->dev); put_dev: put_device(&pdev->dev);