Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4293256pxk; Tue, 22 Sep 2020 15:56:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2T02apBqxiXMbyow7ZahM0oheNTkcmSKK1yFNkIwBLy4wceabWrB8FGXa5vudXY/jOQSb X-Received: by 2002:a05:6402:1656:: with SMTP id s22mr6795490edx.160.1600815403334; Tue, 22 Sep 2020 15:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600815403; cv=none; d=google.com; s=arc-20160816; b=G56V7X8tEmdrZhw/wsVhhBOjT3SN7l4XUfjQ/+99y080NPmH+eqQvx5Vt18L+HhyS7 49Ztr65IKejuyHsGpPLJ+geofdZ5XCXYeGaZ73yvCV49j8PmLU2qowMifMHQ08F4jgBm I21y8/eUrl1N3wBntxfogkqFVaRGSXZTIoxCC/c90iIKdxE2Q6TSlAPrDFa0TkpXj7fh IVpxAUl2IIxMWUKFJBOL2TYw3lT3a9K6cbVEBQMhceLNbYVs6X8TvekEcTBrdsv3Ghpo vrw89lgfwNArR1T359cz/atLTYt2az05BsvtZ0SRJMBvWwWZasKSK6chOv6UKFYWH0qX 1RwA== 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=quaU3N237ENuYY+8BHHumQYpoI+fueLQHJXbKb71IlA=; b=hl+hz1WcjMb8WqhkxG9VG7uS1iiGsmNGv9Cb7IXTLbRiB3iz7KQehIoX6ewU0lQujb ouambynAgAktGMWddwbJoJK++8cCbDJgDjLvW4a4DPRxoxERVWGZ2HQal8F7FQBz/aIA PmTIG/FZ3jhXX0T6fb4uiGSJUgPKY0RoK/67pYh0Vw8oaBf8wQ11EzpyUBfy97D8wdnP foEz2kLlabyBAyKy0T8OPQfQsM4gn+kLqUw3i9urCnz/2RHmQ4PAM0yUGrghxRiOsRti 96++bcmb/lTAMVfc+/Ejmrgy0d4UyTvgoyNYweoUL/WJBQxL+wJiKh2XKbDnwcNxzeRo RRqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RoasUXap; 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 z10si11677702ejj.296.2020.09.22.15.56.19; Tue, 22 Sep 2020 15:56:43 -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=RoasUXap; 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 S1727244AbgIVWyc (ORCPT + 99 others); Tue, 22 Sep 2020 18:54:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726934AbgIVWwl (ORCPT ); Tue, 22 Sep 2020 18:52:41 -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 15595C061755; Tue, 22 Sep 2020 15:52:41 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id z17so19809902lfi.12; Tue, 22 Sep 2020 15:52:40 -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=quaU3N237ENuYY+8BHHumQYpoI+fueLQHJXbKb71IlA=; b=RoasUXapie8yCfGzhzSrBYFgAaByktjPfFLrElNKr6tnUS6cbKkuopDMOx2Ng5Edwz cckCbR2iVeslYJJVAw4/9VzyTRV6aYKXjoh+sL0m9Eoh2TUsjOtuesjMVUqLHXfK4KfX pGXnbCjHL3HBJVOL6NjOIz4jokmuH7JjCFL3wRMq/GKd+xgu1cRStECBKa4u9xEDQLD5 Q6eidGcfqEWBTs6zyVTTCnqw3r23ZAfFmJYHVR5jC0BXSxu4S9KznC1fEsCBGNVabzLN nh/QGEhjTQz5DJEjWXaxtKkTMWhJtt/Y6U5qRda12s5R469dZzhXkuIQL2zkyB4stlsR dBUw== 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=quaU3N237ENuYY+8BHHumQYpoI+fueLQHJXbKb71IlA=; b=rU1QjFw1UFAzfU1IL6hnY/hJSWDXombgNK9pa1k3lmvX+BnckgfE6ex1odXpQXca0Y 46RKpuMi+EoT60ypGGQnnlYF09swawlad5cNuQoEOeWie3iLCqmHtSZnxgNkRR436oWf uhOhwnWSCklfHk45hdbiH6v6FQ+nL5iqLvlsdOAnEq9Yse9eq878bka2zFbrgggm4PjC WItsvzVL3ymW0KddJYn4XZRLw4/iozRWekl5rMfeofun7Rw0OazQSEi3w4yeJMrwm5Rb Jiyy+YOuBI+QeMKsqvqOYOkyzq3uJrgBapVuglkfx5zpDIgFAWmRpCCXwHVXENHH22sI dSEg== X-Gm-Message-State: AOAM533DVV1b303kzAhGDMAsm2DoQwxABLYuhU4wLZCusQGWTnQD25dh nTBAtcdn1IKPr2JP17EkbAY= X-Received: by 2002:a19:c152:: with SMTP id r79mr2188932lff.601.1600815159529; Tue, 22 Sep 2020 15:52:39 -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 l15sm3977588lfk.71.2020.09.22.15.52.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 15:52:39 -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 v8 10/32] i2c: tegra: Use devm_platform_get_and_ioremap_resource() Date: Wed, 23 Sep 2020 01:51:33 +0300 Message-Id: <20200922225155.10798-11-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200922225155.10798-1-digetx@gmail.com> References: <20200922225155.10798-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 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