[v4,09/19] power: reset: rmobile-reset: Use devm_platform_ioremap_resource() helper
Message ID | 20240212162831.67838-10-afd@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-61962-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp28947dyb; Mon, 12 Feb 2024 08:31:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGz7YJ0mj2zEETHqi2FwhvYfVF1aOU+d1q0aWf6mEKJAk26R3upTPRgaC6u2Ww0ohDw6Lqm X-Received: by 2002:a05:6214:4a8d:b0:68c:5cbb:3907 with SMTP id pi13-20020a0562144a8d00b0068c5cbb3907mr10772701qvb.40.1707755507119; Mon, 12 Feb 2024 08:31:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707755507; cv=pass; d=google.com; s=arc-20160816; b=IXVaXHQg1q0AhQVmMCSY99r0/hcm/AsJ/rXWIALS/Zu0We3ft+ay1159PghLbeIO9u 1K+DpKvwt2SOOrq4u5MYIK7Ga9rBX4snmoIqSzPCmUNZGE9qnUt7V6/2i6rdnBkYPvsS W7pRGwGockBbW0odoItzXhXSYl8fQ8utAPu6UObPSSDa1j5SVmhUK3clKHZO7zkcDn7J x9iJO7x7j7QMe8pD8kH4YjwEBKUmr5iC5r2f1pxzMin25UQPIQJ98qQQ2Uf7Vw6V95Wd kWAhjrYPBrD1hFzw0nbSvedvHexd149argD5yc7pcbaJZ5W/Stxi0AzyH+4EdtdlT633 uYwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=cEd9h6ts7ZA9SmxTtqXrV1X3OAdroJfb+pEHlYKYQq0=; fh=sCFiDAy8XXB9NGU/DPtwpfLCjmo0IJMpUfa362QCzqc=; b=mUQb8tnVwoH5qcwqCFmMGffh2xedGRj2zcwNGDbVJrkycDUmMp6MG44NBBFZq37l/o vEv/fZkGXX38kVePJhI+imAzl1WLhU8I4Z2P18h4RPKka4U+4slxwGSrDxXgnfdVJfJx Ms3cU/2TqpZbKy/x3pPeKzAlPB7Potzw7qG/NVul+7s4xD0U0hCZ8FqqQxjuXc1nY6PB zaz3j36Sqb41ZeC5yyJCWZC9qXAG/LvbrrciR+YR/jv3yfFzs9a3e+OcJNJRM6TO+OKY Xlucy8hMA1jSvnwAxVTNe5vrEyCIcdYDa1aA7TOmQhRRe0DI+urUYaDu4pRAEHYxB72U Vi8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PapxqZOB; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-61962-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61962-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com X-Forwarded-Encrypted: i=2; AJvYcCVg1ExwHoBhS3Amv6IKk25hlr6qe1W9CstwKNVCwKhuJsaQ7QfLiMfxVYOI/vMnXEKsUUHvEVAT6UT+eKUluJnz1VoV1Q== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gg4-20020a056214252400b006819bda2532si757080qvb.234.2024.02.12.08.31.47 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 08:31:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61962-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PapxqZOB; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-61962-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61962-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E2AEE1C2189A for <ouuuleilei@gmail.com>; Mon, 12 Feb 2024 16:31:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB54C45C06; Mon, 12 Feb 2024 16:28:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="PapxqZOB" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8246E3D566; Mon, 12 Feb 2024 16:28:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707755330; cv=none; b=l2yp692TK05YdgAgEBPpytn03ynfgDEp8Gr28leDG/V6pph3+hENhhn4bhnC9rLIAVJLxmg30Wqjs8ptMGXmZNqUi0SPsRZJ0kTemMqOBc7IetXZLENhIxGazeFUmtE8vdg9zVhtJa6SjXtLP96zceg0M3trXw6nfZwrZLy7cEI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707755330; c=relaxed/simple; bh=/wWLg9daNT6pfazjCLsyzkG8hTMGV8b457Vt9N+MIYA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UVMXWG5q7UnDWDkBB/kjKEbgn8rfejZC4XXgb4+APREGYQCjsEqxehtzz9fIlWg6uCRD+JWohzhfnSFCxb7FAKaPSpzQjG/TxLCmmF2fvwJINCqV30r0WEDZ3Y5h2l7CgFeXFclNufHggFYNPH3WLQY9vI2qEBEDXx633g0JF9A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=PapxqZOB; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 41CGScF9045203; Mon, 12 Feb 2024 10:28:38 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1707755318; bh=cEd9h6ts7ZA9SmxTtqXrV1X3OAdroJfb+pEHlYKYQq0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=PapxqZOB6kvuEwvbQTINsi/PPh8EPbOUy0zq8RtM/r/IfVt7ECAH0YZ5visw0xtnN enqKz6wPiYR6JR5RpqoRDDC4mY4lRHTVryfphMygRXdk8Ohgvm1rBE3wO9eT1uTdYF L1sYoPC4a/KddmxWCuGGx21VNjm1hWjKnwQdr81o= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 41CGScbp046939 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 12 Feb 2024 10:28:38 -0600 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 12 Feb 2024 10:28:38 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 12 Feb 2024 10:28:38 -0600 Received: from lelvsmtp5.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 41CGSWR5090688; Mon, 12 Feb 2024 10:28:38 -0600 From: Andrew Davis <afd@ti.com> To: Sebastian Reichel <sre@kernel.org>, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>, Cristian Ciocaltea <cristian.ciocaltea@gmail.com>, Florian Fainelli <florian.fainelli@broadcom.com>, Ray Jui <rjui@broadcom.com>, Scott Branden <sbranden@broadcom.com>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Sean Wang <sean.wang@mediatek.com>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> CC: <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-actions@lists.infradead.org>, <linux-arm-msm@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, Andrew Davis <afd@ti.com> Subject: [PATCH v4 09/19] power: reset: rmobile-reset: Use devm_platform_ioremap_resource() helper Date: Mon, 12 Feb 2024 10:28:21 -0600 Message-ID: <20240212162831.67838-10-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240212162831.67838-1-afd@ti.com> References: <20240212162831.67838-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790711438653364369 X-GMAIL-MSGID: 1790711438653364369 |
Series |
Remove pm_power_off use in drivers/power/reset
|
|
Commit Message
Andrew Davis
Feb. 12, 2024, 4:28 p.m. UTC
Use device life-cycle managed ioremap function to simplify probe and
exit paths.
Signed-off-by: Andrew Davis <afd@ti.com>
---
drivers/power/reset/rmobile-reset.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/power/reset/rmobile-reset.c b/drivers/power/reset/rmobile-reset.c index 5df9b41c68c79..29c17ed2d4de9 100644 --- a/drivers/power/reset/rmobile-reset.c +++ b/drivers/power/reset/rmobile-reset.c @@ -41,28 +41,23 @@ static int rmobile_reset_probe(struct platform_device *pdev) { int error; - sysc_base2 = of_iomap(pdev->dev.of_node, 1); - if (!sysc_base2) - return -ENODEV; + sysc_base2 = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(sysc_base2)) + return PTR_ERR(sysc_base2); error = register_restart_handler(&rmobile_reset_nb); if (error) { dev_err(&pdev->dev, "cannot register restart handler (err=%d)\n", error); - goto fail_unmap; + return error; } return 0; - -fail_unmap: - iounmap(sysc_base2); - return error; } static void rmobile_reset_remove(struct platform_device *pdev) { unregister_restart_handler(&rmobile_reset_nb); - iounmap(sysc_base2); } static const struct of_device_id rmobile_reset_of_match[] = {