[v2,09/19] power: reset: rmobile-reset: Use devm_platform_ioremap_resource() helper
Message ID | 20240205194437.180802-10-afd@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-53840-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1156832dyb; Mon, 5 Feb 2024 13:32:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtbuTCEw1Bz/cKBy8oWuSNKWqdESMbwAb8PNqlTdW51Sw1/qmZkR5Nhy5PWiLXyx6z9JXp X-Received: by 2002:a17:902:f745:b0:1d8:b6c8:d9e0 with SMTP id g5-20020a170902f74500b001d8b6c8d9e0mr811367plw.68.1707168740449; Mon, 05 Feb 2024 13:32:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707168740; cv=pass; d=google.com; s=arc-20160816; b=yMF6d46SppWIjVh0R4qcWsL6YM2QPe4BNtEqt2+vBcUF7xY03gB2X9XK0wSlTAf5Xg lxa3RKdWg6+/5J7EyRAPmNoBEe+vq9n6QpWWxS8e6d2eZyOsy29Tm8+JbCwPwsmo/vE9 zfqrOPXLpYaqX32YMYr3cut6ApCaLz/dFhQ9csDZ638ZJOvv2kx7mfoHQ2qS+IPfVr9f S6faYeKFdWblYZIjriTf6iRTbiEb2jMKBeWZBcFDqIzgOfeAxhyJD2iwbSxq0yA8uJd4 +H3WEhlWP2O6UTWGVlQrYtE/Bq7QJnEFKvWdF5eok4VLweXIkxGlHxEgsYdzMwC+chue rVrg== 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=JgKgnWbGgrfLPN3fO3VB7CGVP++aNP+a2c/b3APfJoA=; b=E/0PZnjOGGQ4TALCgIAT1AIPKdKIRp4Wc/t19xKZFUjtDcBQkzv8YexwIT9LN0iY8m 2oq5FM177b9ZmkJu3pjbxstFzMR+iqyMTBmj+rVOdXqLeXNqH45RSw2G2gy9E3uula+P +mizj2vOdofH7NeXTW7uexXelPSAPelcS+Ezt7MwoHepm0blDh66bvdashhD6bq2tMWs j/5XK9LmypbFgH88A3FNbFvyYamz4PS6gM8/5nmqYbJTrR5E2dNqKDXqb/7h07SVADLe NLCP/p6s1Gs8G1kFek2A54vA4llapoy8JX/anfLtDj37HdvaEDAiC1in2yW1nq/vAVqy SYxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=LmHrQ9Hb; 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-53840-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53840-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com X-Forwarded-Encrypted: i=1; AJvYcCW86NkdHZDibWYijWR+cHBiopvRuS3utpp1lwQxf4aWsq76rSVnNP0Ni/jsBHD1Wx429joYYygQ//2cTWls4lvPgsZ/ew== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o5-20020a170902d4c500b001d8fb17a204si447096plg.351.2024.02.05.13.32.20 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 13:32:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53840-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=LmHrQ9Hb; 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-53840-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53840-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9C79F28AF94 for <ouuuleilei@gmail.com>; Mon, 5 Feb 2024 21:25:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40FE76A346; Mon, 5 Feb 2024 19:45:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="LmHrQ9Hb" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 C2B26634FB; Mon, 5 Feb 2024 19:44:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707162299; cv=none; b=Kbwtnf2cNjSH/UUBro471eG1/05kE0quzaqAMIcCWl82XP1+qRZPaKkZ6Fqe/FOkRyIXywRSIEXeBSAE0lrftJPmt7Ere5/NruMCaCJGXhM3umOXJ6huxgRZ6tOnpBDvJeBZfTq4rGlN3cDwuC+fUcuxC9G6H6OKMXBKb79hdJw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707162299; c=relaxed/simple; bh=/wWLg9daNT6pfazjCLsyzkG8hTMGV8b457Vt9N+MIYA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OuPnnqoDuLTt70hukxf7H6fhjGN8m9/qEuuDiP1nqbqKKljj6jJI72pDA+0hBDuUMXLjbha4V70y4k3lJBo6M4tCrOOB5n2uiWesN90OUP4U125YlQRNaZkMKvNN8iuTWl0TGDfjm7eSxOG7ENxbm23tSgahUn+EG+oNaGKUkjY= 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=LmHrQ9Hb; arc=none smtp.client-ip=198.47.19.142 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 lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 415Jiju7019199; Mon, 5 Feb 2024 13:44:45 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1707162285; bh=cEd9h6ts7ZA9SmxTtqXrV1X3OAdroJfb+pEHlYKYQq0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=LmHrQ9Hbfo6vIKGpC3hnSMYqZ53YA2d6q12KS6nZqLMJP2NDixzpI94UYu6hzXDQE juw2fgOpR7JkW0tQK3aDSI2ngWPg03ChC17t9551MO9skM4usWf85VBS8/bvwakb31 WG2YqU41hCcaDgOQJ5/18ifjB1Hwc9th/2ICrUIo= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 415JijQ7073162 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 5 Feb 2024 13:44:45 -0600 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 5 Feb 2024 13:44:44 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE114.ent.ti.com (157.170.170.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, 5 Feb 2024 13:44:44 -0600 Received: from lelvsmtp5.itg.ti.com ([10.249.42.149]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 415JicQW028467; Mon, 5 Feb 2024 13:44:44 -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 v2 09/19] power: reset: rmobile-reset: Use devm_platform_ioremap_resource() helper Date: Mon, 5 Feb 2024 13:44:27 -0600 Message-ID: <20240205194437.180802-10-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240205194437.180802-1-afd@ti.com> References: <20240205194437.180802-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: 1790096169277477868 X-GMAIL-MSGID: 1790096169277477868 |
Series |
Remove pm_power_off use in drivers/power/reset
|
|
Commit Message
Andrew Davis
Feb. 5, 2024, 7:44 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[] = {