Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp406983rdb; Thu, 8 Feb 2024 09:09:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkHCOxBxVRhyvzxofENpTZmf17vKnduCFrNyKu0/prlBCqe8VAwif3/P20LPuJiIqGlKJd X-Received: by 2002:a05:6a00:9a8:b0:6e0:4c77:661a with SMTP id u40-20020a056a0009a800b006e04c77661amr4880928pfg.11.1707412176771; Thu, 08 Feb 2024 09:09:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707412176; cv=pass; d=google.com; s=arc-20160816; b=ZJPAM3PSPp5t4zz0ZHP/+iSSnNHRp2GNZCtOTNNRU0U8+2YNZdUi2GP0YhtVoNahpt Er9gnvYzZ7t7gcA6ejeyML1Me98owpG7FfsEKd76OQSe0wojJSOHhBl1qVq9iUJEdg7e 8vc/Hur04HaL4bGE9loSMlPaKr52S9Ln5XCKEBdNffehSqV6okLNHEaHYnEYkN0DIQ/M 0pCSXVMJa62k+DdHipXI7X3RwWo8NZHT/4kVB3PIafbxm45ZsvZWLGFy4sjn6jCLq9bP ZSVkDXA+tmtosK9nH6KE8r4wRvsCReJac9kdvzde25Od1FcmsrzyZvxl+Qf7qR8YcsB9 3rgA== 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=XhAgrOmjrJOVYyWOjuQjcCAeNEj2FhTduo8UmWVLujo=; b=Am+U/+JQIGrXNiCxiSb8Q0qgk802n57iC30eNYcq1g6ynaakZoOAzRB2vU/DBLGpRL xEKH1PUI+9RfjQiyFb+CDIb2JdBl55o7KB9yCWcgNpLrFZvf1FYbIlyvWx9C4no8fcLk Tu7eRyi2Z1X+S0Cq2nZobreRH5y4WKLqWBAgT1bwz8tyGpmWXMylKD5T2OLMHTuVJ4km le2zogx4tyeqVxxovMwGmXbtqIJec8urjCKDwpL3nFgxcm2H8Npm29fnQeAfkYiDeDwU 5JXuroIdPjRwOAHo2t4pyatPE7L3IlFY0uQe2AAIuZHI9SDCfPBPnJLbV0Cg+wE7sr6+ 6c7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fiop7LMw; 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-58402-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58402-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com X-Forwarded-Encrypted: i=2; AJvYcCXw+mXKlHuguS0nfRVvcoYv6pYxofkHkK50VQJOMWrWL4wtaz4eNThiDpHgO1wU3ueho72j2hkq1RMdF2mKlpLUhTIShiVyUkZrnLR9Xg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u11-20020a62d44b000000b006e04030ef0dsi4125335pfl.195.2024.02.08.09.09.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 09:09:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58402-linux.lists.archive=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=fiop7LMw; 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-58402-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58402-linux.lists.archive=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 EE164288B15 for ; Thu, 8 Feb 2024 17:05:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53FCB85C5C; Thu, 8 Feb 2024 17:04:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="fiop7LMw" 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 546C182D80; Thu, 8 Feb 2024 17:04:34 +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=1707411876; cv=none; b=bEuf9AQi9jp4kCLV7HGbhSGuCgcFh1RP9fSpwA8ZzuRdKtluDOuzaqGElDGbdKMdMHL1Q5Wlia6Vq/VKvEwvniGVdhpb5RjZen3e1qxLDNPgp2B4FxtiDmHKBtTDvRT/bY3IgAfqxN71QopS1SWJzq4Yq2RCRtKYrb3OFW1xc4c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707411876; c=relaxed/simple; bh=/wWLg9daNT6pfazjCLsyzkG8hTMGV8b457Vt9N+MIYA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KCxnsE943dKSIacltnMuVg0BXNPln6hWC54upo8twnoTnT9QFizJemuJPfmbAb9dyBl5gDZ+8v/N1tPUnmrXV1krgRQ2L2N5iTZHGfyj/VxmrKSY3JwP+REqlXzO46cNZ2LfZI9quy/CtiMJoTP2u7B4uelJ6YssE9VgGigY3Bs= 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=fiop7LMw; 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 lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 418H4Iqe018156; Thu, 8 Feb 2024 11:04:18 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1707411858; bh=cEd9h6ts7ZA9SmxTtqXrV1X3OAdroJfb+pEHlYKYQq0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=fiop7LMw7ffBSbbCssLAJojFB0aFGS+AO1EE2WSOkNsqY81lfdFJP/XnCbJYce+ws Ona5r0f37PR4xu4kwARLKAo+t7Jbrq/m0okEVguRpw0UcwXk7UE4/wjncjZ6t578Mb 8T5jFSlJE7HW/OHLMOBLcTfb5YMWgWDX2CZhm3SA= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 418H4IKM023356 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 8 Feb 2024 11:04:18 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 8 Feb 2024 11:04:18 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE105.ent.ti.com (10.64.6.26) 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; Thu, 8 Feb 2024 11:04:18 -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 418H4B6B091006; Thu, 8 Feb 2024 11:04:17 -0600 From: Andrew Davis To: Sebastian Reichel , Manivannan Sadhasivam , Cristian Ciocaltea , Florian Fainelli , Ray Jui , Scott Branden , Bjorn Andersson , Konrad Dybcio , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno CC: , , , , , , Andrew Davis Subject: [PATCH v3 09/19] power: reset: rmobile-reset: Use devm_platform_ioremap_resource() helper Date: Thu, 8 Feb 2024 11:04:00 -0600 Message-ID: <20240208170410.67975-10-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240208170410.67975-1-afd@ti.com> References: <20240208170410.67975-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Use device life-cycle managed ioremap function to simplify probe and exit paths. Signed-off-by: Andrew Davis --- 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[] = { -- 2.39.2