From patchwork Sat Apr 13 10:33:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 162165 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp637939jan; Sat, 13 Apr 2019 03:34:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjdWulI4IXsDrCrj61rWV/nMsGg/Bj2pWbLG5CCACEDY0EB27SGDm52VVHayjDis4cumZ/ X-Received: by 2002:a62:19c3:: with SMTP id 186mr63740060pfz.172.1555151641946; Sat, 13 Apr 2019 03:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555151641; cv=none; d=google.com; s=arc-20160816; b=fOdi0OpMdAoMJI0faJZclPOaDeIS25wK4UeVTgxEbfcuv9pgSfr6nTZJBR1hH0XidH 6+1wdWSJdT7R9sMdSgenEtb/7tUaFgsIUY3mp3goULeST4lqYEki3h9SraIb217dCxKv q7r69ppvy0mrDrn5p7E2w/i9LfxHHyx8P+uO9vm5vXxwlqm/pq8PIzF2f9CNiXKVVPBw 3zaig19CjEyW2yJvn4zL5eyO6kcz+5VbpRWQG7jfF9GDAwA9X5lkXvB9Jm2ch1cqHRQn x75Lulut1gh3JURZTa+VaDoXo9+GnNISguH0GJJpyeuC5Yai4gOOunBqyY3TaaJ7okSI WG5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C0a8sdiQYaX4oWrE+7muICmRubcJy65i2pEeJPhC6s0=; b=EEGQbzhfpZQQOfqNPNIKH/pIxUc0mou+kqOOTF9XYGGmvAUl8PrXVzDzMyhuoySbfL CT/QOuqAj4wwP03uGsGjqJGAXMrThaeyH3dd4cUVSDQOyd94+xkUQ7oxEVhahkhuYXav himbThrdXk4rK8/XbkUrCEFsj4dcwqnNt1y1NfA/lkiorRFHnd/09ZGHso3YE1ySeVNd 99nf28MnQ2iLqBMSNZfH/aK3ru7+L4GmoKC5TdH62otemzTYJCbGN/UjmmpAsC5Ijsbh 204BjzoaoP6DoT+54udD86AR8NARQOBRhjER9YmaifaapNiBLML0h73q7pMfnW0Du34e eW/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ka7IQxU0; 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 3si17186596ple.382.2019.04.13.03.34.01; Sat, 13 Apr 2019 03:34:01 -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=Ka7IQxU0; 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 S1727447AbfDMKeA (ORCPT + 30 others); Sat, 13 Apr 2019 06:34:00 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52310 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727260AbfDMKdY (ORCPT ); Sat, 13 Apr 2019 06:33:24 -0400 Received: by mail-wm1-f67.google.com with SMTP id a184so14214632wma.2 for ; Sat, 13 Apr 2019 03:33:23 -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 :mime-version:content-transfer-encoding; bh=C0a8sdiQYaX4oWrE+7muICmRubcJy65i2pEeJPhC6s0=; b=Ka7IQxU0wxrOaMULh9S/Y+VuJKQmWMuqf1Msqk6rpgXone3/tl96A5jwiaci9BiwKo CcZ5p/+aZMx8qwNyAfezsyxOG2mH2bz0AxidTPzD2aaGLym8t2hVMB3HZ50/l9w2ykqY TxdDQyAmUAeVQFEj9JmAkMAB439+F5xeNGr6It0/v5c8X96Ax2FAlZqzwxFHg3dHB8au x7OKv+GkPnuS4VThKvau5dBcelHgtnbeNCkqYCBX0z0OPXPUbDZfacbknRSfJyGRxX4T LAFo5nXL4GEPTnWxnmLcpAsGuo312wcXYEdAD8YwTu40FJlHBDyfvIf7JpLCNMOJFUAx VFyA== 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:mime-version:content-transfer-encoding; bh=C0a8sdiQYaX4oWrE+7muICmRubcJy65i2pEeJPhC6s0=; b=uThryIy9ToUwOqD4SpkzD9OBUX/nF9jeFWkwfenRBOEWWjECAo+G0OnNkim38LBMnw FO6KN5B7Dqa2uQmygaOn3boEPMGdLES9odo02wdDA/VWJjHgKu+TOE/y/NdFJ2mxtXnd z8flF45jwcM5Dly9fkG8qma92ZekvnRwM1QS2PLmOZ2dPAvqGRY1Vy9Yar7zUyOuxFY3 BYaLppy4MNa5nsRx6Am7feJXudYHbb177Z4qB1KHLprzIJfwCYrz/Stq26/kkWfyQcVm piHHv7PNzeOfO1eBWZ7tRdovh3VQohOqx7MNcrBmlPptqtrUL1DSiJatQG31Cfk8U329 IMZQ== X-Gm-Message-State: APjAAAXdbdMIR3AaRLWEqkJM8mFlyC3UcKcooQY7N340iiUeyWB95FKE +yG656/8LJ9ZrAO2p6q8Xg+P/Q== X-Received: by 2002:a1c:9cd1:: with SMTP id f200mr14800540wme.91.1555151602683; Sat, 13 Apr 2019 03:33:22 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id u17sm19547303wmu.36.2019.04.13.03.33.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 13 Apr 2019 03:33:22 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, srinivas.kandagatla@linaro.org Subject: [RESEND PATCH 15/20] nvmem: mxs-ocotp: use devm_platform_ioremap_resource() to simplify code Date: Sat, 13 Apr 2019 11:33:00 +0100 Message-Id: <20190413103305.9576-16-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190413103305.9576-1-srinivas.kandagatla@linaro.org> References: <20190413103305.9576-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anson Huang Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang Reviewed-by: Mukesh Ojha Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/mxs-ocotp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.21.0 diff --git a/drivers/nvmem/mxs-ocotp.c b/drivers/nvmem/mxs-ocotp.c index 53122f59c4b2..fbb7db6ee1f5 100644 --- a/drivers/nvmem/mxs-ocotp.c +++ b/drivers/nvmem/mxs-ocotp.c @@ -145,7 +145,6 @@ static int mxs_ocotp_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; const struct mxs_data *data; struct mxs_ocotp *otp; - struct resource *res; const struct of_device_id *match; int ret; @@ -157,8 +156,7 @@ static int mxs_ocotp_probe(struct platform_device *pdev) if (!otp) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - otp->base = devm_ioremap_resource(dev, res); + otp->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(otp->base)) return PTR_ERR(otp->base);