Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5852200ybl; Tue, 10 Dec 2019 12:34:23 -0800 (PST) X-Google-Smtp-Source: APXvYqxJWYpgwDdpHAkQezv22ZVOoDkfOZnygtYQveKRPMqxlr5IFQDvm+OdVgWMX7D7mTh6LH1R X-Received: by 2002:a05:6830:2142:: with SMTP id r2mr11939647otd.334.1576010063793; Tue, 10 Dec 2019 12:34:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576010063; cv=none; d=google.com; s=arc-20160816; b=IeVHeU5KzpZueFcjvXL6KXM1djvDwk6zLUzIztQk0hPXW7ie0u2Re3ce9eJukJJsWr JwNo+oGdQkwL0yK/Rqmvg6vx/zwrlFci+9ilHwbX9Iyd/fnP8pZifSQ7sW6T4vzx6jrC 3jrSZ9Jgns3Wf38mxH+aR+qWxP61OQVWr2flvTGsX7NUuK8aPtKIalNE2hC06ZGh0GjL yVtibvDDn6Las5UiksJkLmNX1LQc6TotKKsDT4lna26haOihfxRV7kLrMaYxzccrzmUx AEoXagIaPI8GPVf5Ctts8dS1vTUO4OcuvSigxW8d+6pAeY+E5m6Aeagpvz6GupvDMt4I KeIA== 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:message-id:date :subject:cc:to:from:dkim-signature; bh=YFx2eeL+mMfvTTf1lfSUrY023GFsFEPvhm+wP8s61nE=; b=G475/BF+m6hAjicsjoNn6eIdHYT87xOMTatrru6mN+smjU5cK0oIrX4xv7pja4kilc P9Ae1r9uB6vO+sQ7+IS6clOSLNKVPxUIc3sTGRf9XXFs8Cn3IyN6zU6lfB/UdVSkypdl HcH4TuPdgK3P8COFQNfriAbKAZWZal8EtbAiJEUdyptaZ5tjQC2FTRKaUjMYDabtYXmC rIt71r2qbtwBOAmux0ZAUr5vFimwBhzL7kyIqAlx158S8QM6KXrA5UWJ7c/njhEc19gR onV070xa0X4i5xWVbkfAF9RTfuZZgA1Um7zN8/JIfYx4UYBR1KfDSaigOGwNQZ79q8YN C+5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SBWiep0Y; 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 s14si2463165otq.37.2019.12.10.12.34.11; Tue, 10 Dec 2019 12:34:23 -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=SBWiep0Y; 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 S1727119AbfLJUcL (ORCPT + 99 others); Tue, 10 Dec 2019 15:32:11 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:41891 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727076AbfLJUcF (ORCPT ); Tue, 10 Dec 2019 15:32:05 -0500 Received: by mail-pg1-f196.google.com with SMTP id x8so9433873pgk.8 for ; Tue, 10 Dec 2019 12:32:04 -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; bh=YFx2eeL+mMfvTTf1lfSUrY023GFsFEPvhm+wP8s61nE=; b=SBWiep0YvtZPWNzdZjLGonPbi9n/uBVRyUymQTVSTLhY9kWFbpUUomQ2NP+HJpHC6Y wn4KC5VcDJwJtEzcVIHxzfaTaz5BuaEiap31NcVRZ2Q6ELoAdUwy+XFshLt5l6/bkjHU zFmIfX4GM+CVFaavy5frhpYe8RYvztIsU1v+U2C4XrKmEtcHlzN4FcoYwSZTSo3J5qXU gdLgGKY7AMQams6+9gyArIEcDwvX7l31ejau5nY9vokwSY5QblStrk7OsKRSWVTVEypD RMTg2Bupob+7C/0kxZ6PN1pPd1/a9EW+TKfzMm6QwDr+nGt2vSADC5vGP7B94+AgwYhz 80DQ== 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; bh=YFx2eeL+mMfvTTf1lfSUrY023GFsFEPvhm+wP8s61nE=; b=Zq9vMaMnt0r1Mb0pZZf5arDjSh2bU21qyh58/Ot5UuEgujhraTgOlH5d3TGsvLhaIi DC0OQeRB/7PtdQ/xDfqQS1Sbzsd8kM1LYSNMIHBI0n7JI71DOt0NMeaByc49OsnPkE/5 LwkCPSmp1oK8MsJJMjzTqdJK3L0bBo7jqiINoc36LkAV3q8HPbw49no2GPdFXyd8nYUK d/+upvkKAf+kYGZfR38/1uEDlRDp3b9B05QJmsig/zOmxoJ28vSn7KB1BGu69QhcT4P+ CV0dmiz7rln8QAwofXibhD5KLJHTGGL36FTUwuxD77e7w3YXz9sckpExOeWC2QdFeD2V ogFw== X-Gm-Message-State: APjAAAVVykk0D4PTTfjglRse0FknqAlabmE5ECCBx7jrGNZyYFd5KEbL JzZ4Lr9d+qg8B3UyrYL+5AA= X-Received: by 2002:a62:ed0b:: with SMTP id u11mr36347939pfh.46.1576009924303; Tue, 10 Dec 2019 12:32:04 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id l14sm2360727pgt.42.2019.12.10.12.32.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Dec 2019 12:32:03 -0800 (PST) From: Yangtao Li To: gregkh@linuxfoundation.org, rafael@kernel.org, srinivas.kandagatla@linaro.org, vz@mleia.com, khilman@baylibre.com, mripard@kernel.org, wens@csie.org, andriy.shevchenko@linux.intel.com, mchehab+samsung@kernel.org, mans@mansr.com, treding@nvidia.com, suzuki.poulose@arm.com, bgolaszewski@baylibre.com, tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, Yangtao Li Subject: [PATCH 4/5] nvmem: bcm-ocotp: convert to devm_platform_ioremap_resource Date: Tue, 10 Dec 2019 20:31:49 +0000 Message-Id: <20191210203149.7115-5-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191210203149.7115-1-tiny.windzz@gmail.com> References: <20191210203149.7115-1-tiny.windzz@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/nvmem/bcm-ocotp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/nvmem/bcm-ocotp.c b/drivers/nvmem/bcm-ocotp.c index a8097511582a..87b7198a7676 100644 --- a/drivers/nvmem/bcm-ocotp.c +++ b/drivers/nvmem/bcm-ocotp.c @@ -254,7 +254,6 @@ MODULE_DEVICE_TABLE(acpi, bcm_otpc_acpi_ids); static int bcm_otpc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct otpc_priv *priv; struct nvmem_device *nvmem; int err; @@ -269,8 +268,7 @@ static int bcm_otpc_probe(struct platform_device *pdev) return -ENODEV; /* Get OTP base address register. */ - 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)) { dev_err(dev, "unable to map I/O memory\n"); return PTR_ERR(priv->base); -- 2.17.1