Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4126776pxk; Tue, 29 Sep 2020 15:22:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaWOyF4IhDq19rHhMyiPlSqbsPrek6wKKglc6VSwzFcNuU6CWTjMiXwegVUVPDpl1BhhUq X-Received: by 2002:a05:6402:8d3:: with SMTP id d19mr5699539edz.68.1601418162898; Tue, 29 Sep 2020 15:22:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601418162; cv=none; d=google.com; s=arc-20160816; b=pIRSXkWZ8vH8hxKyYxBSv91oItJvuivaKNirUJdd8hl0DoocltuUIiDR1FZ1ubJ4Cw vOJz6KdJTef1MaCacVuTy/ld6EJOPupKlpH8EMaWQSvtxAr0Ab+y2lo9uNcqlFOyAKKQ 4xh9lRIO3EkEK6rGSxmpZ/GMG8L7eQ696gyhjbUukyRV72pHAguGONB/AWtsNrBH/tAM uzyM2nmsP/FIXrHTj6wcD4tUYzyXNkZ4WjH1IlRjqUbk6X6KQNvRXX7rJyCto3ZSbN0h +BZKUbCXGepnFPyB/me5sVgUih+FA3tLzWNbZBDT8K5+Og6Fkh+C9///DlXd7Ix1pjeI Ieqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iPlFi2S/cmjUsxvBwkanO4MpIWrGtYus5a2EcdQgd70=; b=qmjSdmEwEEDm30mCD2dVtoVpUJ5/IyI+xVg424JDh+a7WJg54MSlmLjcsZceLuI+5e 2aoBfW6w069jNrbi/k6RMYLgj2WTUzoUs8kQoLYJAuwjzgWimo2GHmlGIuAPiKOBTbJG tqVHv2fuEqAYjlQz1vETdmFV7mXyAYczPHd7xN97RwnSf/D/jUMp+v3kDF7TCdKt8+35 YzsgZfww59j8wJZFbrgQNMXl38bKAfh1gQHBsxf+j0no0MXThU9x3eTNFwdi5k2xoPzk goO7yhK49wxJPTnn9Zeg2zMaUsgoWZMk7ACcrsYMV2lgAg5fLhSV+4I47NhcguCWnpc9 Q2lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Yg/frGn/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id s24si4024843ejd.606.2020.09.29.15.22.20; Tue, 29 Sep 2020 15:22:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Yg/frGn/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729232AbgI2WVB (ORCPT + 99 others); Tue, 29 Sep 2020 18:21:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729021AbgI2WUs (ORCPT ); Tue, 29 Sep 2020 18:20:48 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD2CBC0613D0; Tue, 29 Sep 2020 15:20:47 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id w11so7450428lfn.2; Tue, 29 Sep 2020 15:20:47 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=iPlFi2S/cmjUsxvBwkanO4MpIWrGtYus5a2EcdQgd70=; b=Yg/frGn/rolI9XzUB7nA8Kchw6CrRy6HPtDENkvRX69krrlbkvWIDnuFqt7ALUvfkG wAxBYqXJ7fehtVyBVqgND8LYRLQTZM2+fiNof0czdOSYzvzsnnuyNPExtOXHfbLAYVED LZndfRsG1ggzynA1BxEVtfd0cZX0l90Xv3O4p/EEtIvgxhuyzT48WNlAMJPaZ2wLbef0 BNni6DtyC9Of2zt5wOcniaOXWTKFOiM8Dxlx9TExoQtUwA1uAZH5050gv5r+P14Ddhlu ZWOlKNHWKSS80IzBGN/8wwreuiIIGrZkRx3DPWueV6ZeT8YNVB899xtZ0kEkJgxP1ZYI YasQ== 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=iPlFi2S/cmjUsxvBwkanO4MpIWrGtYus5a2EcdQgd70=; b=kd/y9nywgPdDHrCfbYwF3go0hHTQQFhF7KkXjI8WNH3sNoE0n20Jb1znAGpu5MVq7O P5qpYwHqa0t2vOo6DToCDdcin3+c4PvFd/6/SAUsnadLpRpQg8RZjt/JiHj7TmjXHqj7 mwADYisQBJsvhZM9GfPtKpPP3qDPBGwdT22dYUV/SVmqpKVpUHqOnmNUqVdMo54svbxl Sra7jSUJ6gaz5fz0nbgFGa41FC3PPEb1bwgRlIiyHh77do6DnBdyoOhbg14bmj5LqThn iCfHZ+6hEmu2aS4/zMmxsnrmHwfZ1ZZZpBiX0V/7Xjy2aDwmV8rI9lOqUloTBRIpmVlI t3LA== X-Gm-Message-State: AOAM531XEHcEFBd1TRUqTRPUXsJ06YLvFYZVkkGQ/6k53wOgokytK7li zeuD15VsgYecUdSnsBS0Zrw= X-Received: by 2002:a19:5e4a:: with SMTP id z10mr1820526lfi.380.1601418046145; Tue, 29 Sep 2020 15:20:46 -0700 (PDT) Received: from localhost.localdomain (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.gmail.com with ESMTPSA id q18sm3379750lfr.138.2020.09.29.15.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2020 15:20:45 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Laxman Dewangan , Wolfram Sang , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Andy Shevchenko Cc: linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v9 10/32] i2c: tegra: Use devm_platform_get_and_ioremap_resource() Date: Wed, 30 Sep 2020 01:18:53 +0300 Message-Id: <20200929221915.10979-11-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200929221915.10979-1-digetx@gmail.com> References: <20200929221915.10979-1-digetx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Driver now uses devm_platform_get_and_ioremap_resource() which replaces the typical boilerplate code and makes code cleaner. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko --- drivers/i2c/busses/i2c-tegra.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index 90ba2f5327c5..c2bbdf92b11f 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -1678,12 +1678,12 @@ static int tegra_i2c_probe(struct platform_device *pdev) int irq; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base_phys = res->start; - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(base)) return PTR_ERR(base); + base_phys = res->start; + res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!res) { dev_err(&pdev->dev, "no irq resource\n"); -- 2.27.0