From patchwork Wed Feb 12 11:12:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13971378 X-Patchwork-Delegate: geert@linux-m68k.org Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A1BE920B204 for ; Wed, 12 Feb 2025 11:12:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739358777; cv=none; b=YGzPkS3pqR+snF4xlgZ7JiYK5xRLT3TIvur1JJa/pkapm4O736N6X+ZZAx0bEkLvgmjWs9bPJ6w459PCW7NUv0XlYI/3KP+foELqUG4CejN7TM+h7X2g0BssR3qq9DNhqMHwF4GmAuxRQ9mtWKFCSihbvYCk8BgDMvjgeXTFzmE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739358777; c=relaxed/simple; bh=BIQ8kZVxPWGyriNICFUjpvwi2mTVRCqKFF7SX7xWsak=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Lgh7LmQOCjMMsGAKkaP/f2K1k7MqOegeqQ7jAkGtLq8D/bvlfRI9Trve4cEo45pndqbp5BJZTap98x7PSn9VzalYsq1vODmrdZAr1rZR5K7jfh69lNIC/or1kNfWhqcMN6SacYV7iNiOIXVfdT35GRwXq+764RjgrIC9Q+GVtaA= 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.171 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: +qLV9F/CTvmniNT+8Iw5CQ== X-CSE-MsgGUID: eI0k710ATDqHh6TE64lFfg== Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 12 Feb 2025 20:12:55 +0900 Received: from localhost.localdomain (unknown [10.226.92.135]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 2991A425C777; Wed, 12 Feb 2025 20:12:52 +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 v5 06/12] irqchip/renesas-rzv2h: Use devm_pm_runtime_enable() Date: Wed, 12 Feb 2025 11:12:15 +0000 Message-ID: <20250212111231.143277-7-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250212111231.143277-1-biju.das.jz@bp.renesas.com> References: <20250212111231.143277-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(). Reviewed-by: Philipp Zabel Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das --- v4->v5: * No change. v3->v4: * Collected tags. 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 edae54f9f5da..10b9b63a1f09 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; }