From patchwork Sat Apr 13 10:32:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 162166 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp637975jan; Sat, 13 Apr 2019 03:34:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrME58BL4QGs7Ad3JScYfqpHIChk1fqCQqilLGNYEYz5tF7kh8z97+d7arAf2PjX+xyVna X-Received: by 2002:a63:7153:: with SMTP id b19mr56566551pgn.289.1555151644084; Sat, 13 Apr 2019 03:34:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555151644; cv=none; d=google.com; s=arc-20160816; b=aZFGBxk5blF1zJM1m5UxJEGVdp9RpiUsNd1YEaOXg5eoUybj6ctwJEyrtgMfiK79cC uf5lXKXlu9/hvRXFaoVMNgUfFbz4vWJzgE2QPmM3DmVjHa1SHngkXYHCCmMecO6qK7hg 4K2iqwS46KIzlonEyprMazHl6V0+HvNK+ZrEa+C9aNtqPqVS6HvH5kHXGw9bytmNQjon 2Zu/EAf91mfSXl4vG6cVYAX9Bpaq5XUczBkaTVOBLZJjxk22+ho7ePnHgFzX8u4/GcqA Md2L3zTJ7D8NtqKK5S+02bA6/o5wEotQxEm/h8+3D4kKYefKnCyzoubtQ5VflCi4udG/ a74g== 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=WQo2bDCPCuVEHzhz8CzwPI4g2+nR4mRWEsoJO1u+zRM=; b=X9/YJg6VW5p16WyNlZE+TrcEOFtlRGWQjfprPAN0eAtwy7qyv/k9WAgF08ewrlX6qz EturAcdBVef/4YvMP6HT0827+kg1gOy9QUAQlHq4ZBb8nkyoVhHwsr2dSk6UUhzutvg3 U7iqOatrpHN3/pMxnLcTiGiY3/o25hlpB/IDQMucfW502i1kIofHFXq3OPMkhY9VYvY9 Mucglnu9FmIexjLfykDM82oR7AQu9WveKtb48qBMzLZ984qZHnp+bJHiethUKh+qh3Zb MPAm4D/fz7N2HRZ5G5kKt3wbExRyopZLQSnk9KBQ4EO9XcAjJie+CWD4rpZlFm+Ci2pw IEZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=llomm8oR; 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 d69si23430012pgc.451.2019.04.13.03.34.03; Sat, 13 Apr 2019 03:34:04 -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=llomm8oR; 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 S1727491AbfDMKeC (ORCPT + 30 others); Sat, 13 Apr 2019 06:34:02 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:39451 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727245AbfDMKdX (ORCPT ); Sat, 13 Apr 2019 06:33:23 -0400 Received: by mail-wm1-f67.google.com with SMTP id n25so13872027wmk.4 for ; Sat, 13 Apr 2019 03:33:22 -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=WQo2bDCPCuVEHzhz8CzwPI4g2+nR4mRWEsoJO1u+zRM=; b=llomm8oRMPa9VM0z2O8jIBlUV+R6t25HnvNILlOmgqQQXJBRQhlP+J6syXBjJRPsi5 MPLcN4HDxUKO6l9wfxBcTM1S2Dw8pp6RR+Ty7p4IqNmQGRLLBgxJCXCKDFpNeAzHX11o R4DoKrr9V8GajIebnWwaqWEonmCmHwNFqb5dHsdD5LT+86r2ZTR4B7Aqtk3UVsjuqzIT ynv5fOWRzbuyLeNYxO2+CNF+ZaP65gXH58Typ5OBepga0uoQpvFeNkCvZDYSNKZLz5DF V6eQHe1TR9BBZK6xNlWdcNI670QzzpYc1tuRO7N2spyxZxfL9Ld6iECLWvpjZr68UXhd ZFrg== 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=WQo2bDCPCuVEHzhz8CzwPI4g2+nR4mRWEsoJO1u+zRM=; b=CT0FS2O7WO2BHR4MphLSBbWKV5XMMVckm1gIo/sM0H8JuHv+KGQ356RLtajHAgVI9t l++KamZW3g+ppe0TUdRb2/kxiO1cVAN91Ymp+cic93C8GhehtOWRndXCZFjMJ/LMkU/e iCWTLXcgLBFGLZ5LFbYAhGIfjmLJWUAIrB/McE3bQHCnKhzwzTkUkBS2kHDgnRW0U5EY l4DtsEo491dwxFwF547RcNSoSXxFKYwDSvn58C06bBIEBqtwzGwy9P9buO3phdPK8pyH 2VYRvJbiVVjyF/S6aY3+YTgZyYsZJNRXpLXS/ucQWzQ9seFuq06o0YddMi8+XV8dQIMo YqXg== X-Gm-Message-State: APjAAAV8hjXePllKr3q2P0280RsOEy6NtLmdLHyfEAAqFYDO6vBNi/g+ BsYDL1UlHZxYNZoQG99iv5wfV8BVBaM= X-Received: by 2002:a7b:c844:: with SMTP id c4mr14294612wml.108.1555151601807; Sat, 13 Apr 2019 03:33:21 -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:21 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, srinivas.kandagatla@linaro.org Subject: [RESEND PATCH 14/20] nvmem: imx-ocotp: use devm_platform_ioremap_resource() to simplify code Date: Sat, 13 Apr 2019 11:32:59 +0100 Message-Id: <20190413103305.9576-15-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/imx-ocotp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.21.0 diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index e0b22b6c045b..4cf7b61e4bf5 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -467,7 +467,6 @@ MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids); static int imx_ocotp_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct ocotp_priv *priv; struct nvmem_device *nvmem; @@ -477,8 +476,7 @@ static int imx_ocotp_probe(struct platform_device *pdev) priv->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) return PTR_ERR(priv->base);