From patchwork Fri Sep 27 07:10:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 174588 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3112758ill; Fri, 27 Sep 2019 00:11:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKhbSrUTm1C3gJz4iPwp6UMZj8Old995WmNvVJmBPsT3qyGNDNckE+T68Y5kwfH8WsO+vy X-Received: by 2002:a50:d51b:: with SMTP id u27mr2828726edi.249.1569568277387; Fri, 27 Sep 2019 00:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569568277; cv=none; d=google.com; s=arc-20160816; b=ttCNTu81bgA8hVRuFLgAZ2uqY+xoVJv3phjbh3qdNku+fKHU/GiyMBu/W1u1+WSR8/ bSsq9eOvrZxLhCIgaDO5BBFOe5qOdoFlZcccXxNGOJCLgN4dKA1PNEC2+2M2CImtWKPq TQCZf4rY6iTk53uc3mxX12XHQsAvqAWh/YUgGRaTJiFaPefXcX4LShwJsaDJmmT51nse uCbxzW/BeTS7hFX39K9Dd16kZXG09eM9MCd3+srkplzHMqDlz0AtSPCqUorYzYgIom2u t4MUsCnAagsLBecy3zpKdPVRFZY21VJedSUrjl0BKg+7UecU9h05FcDj5tpLn3VvidCY hLeg== 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=v4CYbDgI+ZExVL7Ey3SHDVJYdquQ6nNneks9sNV/1zM=; b=kNSzbgHK8IsCCKRmP5wRCIh2vtwdDdigIpPvsUjrpFVIV0o91GVYrp00f24D+784FU nSQbKj2a3ZXQT/QYLh+JxYXtwFx2ODwhW+rpcFmm82df7TE3Jrhw3w0e/kzgbIxjb2dN dQu8zdsKF4q/oqEFnWSao4IvvEymBntDovfqfy+oWOhXbgX9jjB7j3Cg5YQbCeteR/rp o0DyxArBph2N2fxux1Uzx62PRDeB6aRxu0Vvq2UQJKk7TC7ogk2EkOtUktUD4TBKkezR SlJ3iYm2U2gn/AxqLwifCqAJMUFEcQw0k2cnTJtEBICs7E7BJq+a1mGI9QIv8VecgfAh Rnmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fGAQuYaU; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si387959ejo.82.2019.09.27.00.11.17; Fri, 27 Sep 2019 00:11:17 -0700 (PDT) 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=@linaro.org header.s=google header.b=fGAQuYaU; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726429AbfI0HLP (ORCPT + 26 others); Fri, 27 Sep 2019 03:11:15 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:36674 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726376AbfI0HLO (ORCPT ); Fri, 27 Sep 2019 03:11:14 -0400 Received: by mail-pf1-f196.google.com with SMTP id y22so1025087pfr.3 for ; Fri, 27 Sep 2019 00:11:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=v4CYbDgI+ZExVL7Ey3SHDVJYdquQ6nNneks9sNV/1zM=; b=fGAQuYaUuJS0onXta9DcP5iWkDlCdRyhW6e05Srzg1F77NNnN1B8+yp3U3Ne3I2eke 3VznwdYIPtImlztVmwSxvWqx0oVEZ9/fik0CGbbk7JzqXeuS0/aJRlseVEL9V38qbbgr hI7W36dxeFE5xEkU74/b9n1KW+FHDOsMtcCv9vBKX7SWKSQsFd/pJzb0S6bPJ7Jko5Ke F+S+yrbazWCAk2was1TAONqtYf3BZ2Y10J+z2iUDT8FfzKv6D4lyXuVCDlRDkN65qUBi yHFTJpHRHShe2hjBe+uLONkIhf/yP2V2Eequ5BmO+hyexkwSQd22M6KtsRzI7ehL6PQQ ZmnA== 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=v4CYbDgI+ZExVL7Ey3SHDVJYdquQ6nNneks9sNV/1zM=; b=fTf8gExaH997eJzNuGde/v3qb+Y4YEsEsINRZub3rnV+32vEzUy6yyfLR/GoOEF6YI hMzbE1W3VyfOTo4MojULuKQaIGobu7zceqMVUyfsFY5ZOCLOQCzquTKTDYHkXb7L2pXy zhP4s7y37DTOli32iPIYMTo3jQD2TD1DAPO4WUSodhHj12XexKQQFQz0vfbFHhTk3tBN Rxxcvy3+1HONzixgZ64imNFo3I1zxcZhLgmIFFdcCdh9t5Bb2odKzEYMmHUi3rKuWzeq /rmf0d43bJaOh6QsSA1xMMU1xglWop4MddVykQX2zSEL3ibeuT+tv5aYsPSZgCtjoqvA 2A8g== X-Gm-Message-State: APjAAAXNuDkjjH2camuKHa16oTU1Wqb0Ox++63Djn+FYMMOfYQsIJRz9 t5H+xh+i7qygWlnLq0BZY8vDcA== X-Received: by 2002:a17:90b:8d1:: with SMTP id ds17mr8096278pjb.105.1569568274050; Fri, 27 Sep 2019 00:11:14 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id f74sm1733288pfa.34.2019.09.27.00.11.11 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Sep 2019 00:11:13 -0700 (PDT) From: Baolin Wang To: ohad@wizery.com, bjorn.andersson@linaro.org Cc: orsonzhai@gmail.com, baolin.wang@linaro.org, zhang.lyra@gmail.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] hwspinlock: sprd: Change to use devm_platform_ioremap_resource() Date: Fri, 27 Sep 2019 15:10:44 +0800 Message-Id: <00916cd2409a5607fc4023a4cae351f1b2e84d8a.1569567749.git.baolin.wang@linaro.org> 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/sprd_hwspinlock.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.7.9.5 diff --git a/drivers/hwspinlock/sprd_hwspinlock.c b/drivers/hwspinlock/sprd_hwspinlock.c index dc42bf5..7a8534f 100644 --- a/drivers/hwspinlock/sprd_hwspinlock.c +++ b/drivers/hwspinlock/sprd_hwspinlock.c @@ -83,7 +83,6 @@ static int sprd_hwspinlock_probe(struct platform_device *pdev) { struct sprd_hwspinlock_dev *sprd_hwlock; struct hwspinlock *lock; - struct resource *res; int i, ret; if (!pdev->dev.of_node) @@ -96,8 +95,7 @@ static int sprd_hwspinlock_probe(struct platform_device *pdev) if (!sprd_hwlock) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sprd_hwlock->base = devm_ioremap_resource(&pdev->dev, res); + sprd_hwlock->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(sprd_hwlock->base)) return PTR_ERR(sprd_hwlock->base);