Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp284552ybl; Tue, 7 Jan 2020 19:25:11 -0800 (PST) X-Google-Smtp-Source: APXvYqzOFmBKrVHFlox15XGu5zBzIjKpSmhAgltiBDU/6HkMgEZfk6F217BqSDhUCu68yxxrEnM0 X-Received: by 2002:aca:edc5:: with SMTP id l188mr1345971oih.55.1578453910978; Tue, 07 Jan 2020 19:25:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578453910; cv=none; d=google.com; s=arc-20160816; b=tunKkvMHPHyrypXcsu+K6F5Mvx3Vw47qVxZax2BSkCMMuN5CkbBnP3dVito3GFk/MN iR5bGPtciLItGpiOkWkz4oEu5OQpniFqwYJxnt8MTpfdWLCuG/Ad8aAGEi9yjUptl7Af eEvYER/641F9HEZQEFvsPzueKEqEsRh/iYXPFs2pRn0XWocUwMz0Lq/ywM/EkPTqgKtb +bL7TGBxshg5Wy+BvYbhQfiygKMO6yrsJ8ulIzArj/fedTuhzCAkFyUdTC4VQr2Y1Ph2 F1bzXPkLa5wImbDLi2YNXtRARbc0yCYGPRG/v/TXBxgxnzADJsQJdSXhXbA5w1cYcKRn 2a4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=Yr7ow8GTmJkAHzIYaMaQkuIE5TitlU69AapCYxHxDps=; b=r+M2rYo1VmtU5vcOoeyztnLRa7zrVXh9LYRWLekiLoncv3qiAaPGP+rUUCShWKGTrq 5aTF15PisRjARaafMW0pqoK7JFBGpcbsqtxWL4IU1obZ8nYzgGjs3vp74jbPB8JipSZn sdPNVLY5+hMUwejdHPopH7CAUT/YYqx7lHiTjOMpPd37MWUlU5BN0rrlIUCtpxVIfYl/ Zvh5WsJOAznqnz5esIkSTu5/g/NgXSG8BrnBOR89eyCxcj9BF2qrsP1PvkclF3IPiQHg n4bvhN9+SDmGj5pPSzB9FsIoD2cDVWgg7RuufEoNhc0uK3+w8jX4VwR38wTRSJ+SoRTs NhqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="PJxpo/SH"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10si1330742otj.260.2020.01.07.19.24.55; Tue, 07 Jan 2020 19:25:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="PJxpo/SH"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726439AbgAHDYJ (ORCPT + 99 others); Tue, 7 Jan 2020 22:24:09 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:37937 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgAHDYI (ORCPT ); Tue, 7 Jan 2020 22:24:08 -0500 Received: by mail-pf1-f193.google.com with SMTP id x185so884062pfc.5; Tue, 07 Jan 2020 19:24:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=Yr7ow8GTmJkAHzIYaMaQkuIE5TitlU69AapCYxHxDps=; b=PJxpo/SHdwwoGkXr0J2qM59FCUCLggOZnuzUinBypKNTya68JfKqKnqrxRSzt8wlHL LjoUY1wArm6F+WoLHFjglR+sprDXVhrb7Z+BCgtliCTsjxv6F6wUoE+bjHpNvOrExaFr 5YVQVoe0Ix1q668tsWmMrJath+A5yK+IRiSri00cYc47i6edLxX9B4YmZjMzATkcco6p BAZ/wYrLibXK5+zAlGLuIlfjvvBCx6KQnsBkeOXCE4VilnyHd/QRSwGFwfmKhJ++hHV1 XYkUsOpsWYO/0FUO20MoZeSN24Jiv4Kyn3ejlQXagD1MRAAr6yr9dHKg8Cg+93gz6xEk 15DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=Yr7ow8GTmJkAHzIYaMaQkuIE5TitlU69AapCYxHxDps=; b=PFYIq0XXIb/N+lvwkFmNXx1IlW+/AMThtis8ixErvIebIVslH5evQ0gnsoWSa17485 XCZ75OUhREVoe3XM0ytQ9h1XVoqc5EF8m4KkkK4A/jq1d80R7RRiLjchrEf6AUoLXR07 IHHyLtlXKdBnQlvjhUEtEi72PsxE9SB+c8a5sm3K/OUFOCMtstsefvYhxdFaMjbJbhyu ETQYCtSwt2u+XRhQfy/LsCcyob5AjCfzhQ6yQalMuKz962tJ77sytv0QM00tdc8aCv/E flQQO5n5tkCPFJLnG4sWodUf66cb1VKU8UMjFrN1rbvnixiBf2tzm8FJo8kKk/L9I+7K xJrg== X-Gm-Message-State: APjAAAUI6UC6iTdANLUIRh5ZJLvEa9i2Uw6RH4sUIxO/z3TKwuK35Y84 rfJb9BUSx/t7P/VBPZCSAHc= X-Received: by 2002:a63:1d1a:: with SMTP id d26mr2920384pgd.98.1578453847905; Tue, 07 Jan 2020 19:24:07 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id g7sm1077875pfq.33.2020.01.07.19.24.05 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jan 2020 19:24:07 -0800 (PST) From: Baolin Wang To: ohad@wizery.com, bjorn.andersson@linaro.org, baohua@kernel.org Cc: linux-arm-kernel@lists.infradead.org, baolin.wang7@gmail.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 1/3] hwspinlock: sirf: Change to use devm_platform_ioremap_resource() Date: Wed, 8 Jan 2020 11:23:44 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together, which can simpify the code. Signed-off-by: Baolin Wang --- drivers/hwspinlock/sirf_hwspinlock.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/hwspinlock/sirf_hwspinlock.c b/drivers/hwspinlock/sirf_hwspinlock.c index 1f625cd..8cb5fd4 100644 --- a/drivers/hwspinlock/sirf_hwspinlock.c +++ b/drivers/hwspinlock/sirf_hwspinlock.c @@ -69,9 +69,9 @@ static int sirf_hwspinlock_probe(struct platform_device *pdev) return -ENOMEM; /* retrieve io base */ - hwspin->io_base = of_iomap(pdev->dev.of_node, 0); - if (!hwspin->io_base) - return -ENOMEM; + hwspin->io_base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(hwspin->io_base)) + return PTR_ERR(hwspin->io_base); for (idx = 0; idx < HW_SPINLOCK_NUMBER; idx++) { hwlock = &hwspin->bank.lock[idx]; @@ -92,7 +92,6 @@ static int sirf_hwspinlock_probe(struct platform_device *pdev) reg_failed: pm_runtime_disable(&pdev->dev); - iounmap(hwspin->io_base); return ret; } @@ -110,8 +109,6 @@ static int sirf_hwspinlock_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); - iounmap(hwspin->io_base); - return 0; } -- 1.7.9.5