From patchwork Tue Jan 28 10:46:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13952441 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 637AE19D07E for ; Tue, 28 Jan 2025 10:47: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=1738061272; cv=none; b=OTYKuIwkdbpZKN7TNkmt/c3ZjMj4v20YnKhLwEzet3ARXcaGaoeNubIiaRUTfmPSmEtRZP3+eS3PxBcaxxwqi73B71AZr2UkCgx82CvQ8zGgAMS/bo8ZMwJpgEt9TKse47co9XEnb+gSxtpoBUgpt2lv2dvBVNjbh5xflzu+bps= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738061272; c=relaxed/simple; bh=TDGVzuKohj7NS0FPzh8rAbFRusgwn415RvA20SRxMOA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hgIP/lTZI+jhX5E4XU+rGxJhpjaeGYWemrKuMfWS4OFexVoaVAaeQ4BPuoRGHC+43EsaluGTEMLVKbgy+bOACiBqfkGlV4VxEl/GCAjIJEIpzqpZuwV9m9GQJJHFkUYpfR7Dq5gjtCUruvL6Dk307XliTnYkmAH8HBx+jiAIw5w= 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: 3NPbdNgIRMmO1zsnZxT49g== X-CSE-MsgGUID: NM6Q4olwTvOB7sGgbk20FA== Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 28 Jan 2025 19:47:49 +0900 Received: from localhost.localdomain (unknown [10.226.93.131]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id BF20F41FB5B3; Tue, 28 Jan 2025 19:47:37 +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 v3 06/13] irqchip/renesas-rzv2h: Use devm_pm_runtime_enable() Date: Tue, 28 Jan 2025 10:46:56 +0000 Message-ID: <20250128104714.80807-7-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250128104714.80807-1-biju.das.jz@bp.renesas.com> References: <20250128104714.80807-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 Reviewed-by: Philipp Zabel Reviewed-by: Geert Uytterhoeven --- v2->v3: * Updated commit header. * Replaced 'goto put_dev' by 'return ret' as put_device() called by devm_add_action_or_reset(). 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 95df8e0755e3..0211fd936514 100644 --- a/drivers/irqchip/irq-renesas-rzv2h.c +++ b/drivers/irqchip/irq-renesas-rzv2h.c @@ -468,11 +468,16 @@ static int rzv2h_icu_init(struct device_node *node, struct device_node *parent) return ret; } - 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); + return ret; + } + 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; + return ret; } raw_spin_lock_init(&rzv2h_icu_data->lock); @@ -493,8 +498,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); return ret; }