From patchwork Wed Apr 8 18:22:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207718 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49656C2D0F4 for ; Wed, 8 Apr 2020 18:24:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1E56820771 for ; Wed, 8 Apr 2020 18:24:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XJMeMnAM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729627AbgDHSYC (ORCPT ); Wed, 8 Apr 2020 14:24:02 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38444 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729702AbgDHSYB (ORCPT ); Wed, 8 Apr 2020 14:24:01 -0400 Received: by mail-pl1-f196.google.com with SMTP id w3so2815690plz.5; Wed, 08 Apr 2020 11:24:01 -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=lkpS6QNa7cbHMSUzBvyu57zDrxRlz++kSAez7ECVngE=; b=XJMeMnAM0rP0yUuHh4yNg322Hgp5TLUrtDCeOFJtIpWw+/7uyuAc9ntowzbLAm9ns6 n81EWaXngzghXNeQnM3wGHT+0Q1rXSrhjVwTaHiIt02QZjzIu07VhqS0gIC/Nxf0V8yO 7ix5/1/0DLcGvmQrpF6wTX3pGTQGbSoBc/yXrYWY0UTNn6zlCP/zd6mATn7P0LNsIAPR REg4Tnle/zrz4SIIi46Uu7CBmVtI045e64Yl1STTRKXnMuN/wf+ThdMZlLt0/f9MCKdr bIv+IGDwk5RUwmjDt5SvVlr5T+7hmfyuTvQX/Nj/ev9PEx473uiathS8ENE1jdf73kSa t9ww== 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=lkpS6QNa7cbHMSUzBvyu57zDrxRlz++kSAez7ECVngE=; b=d0LYyeGTmbCtSFuIceLujzEpZpa2ZIzYblCpA75ThbUwppJ0w7h2b/a5TWipBRHyD/ dOcl5lCxZQBU4UdAcgnvIh7HZCbkILfu8VQ2qw3D1zxXqtQFd5es0aK4vIxqLpkdT22F KvSS1Mzijt1pJmDsVUVIkPtSf8X6BYODMUAw6hTt1Ndv7MylFytPyD5Vqm2UWUjed0ho 5ty0BJgrqIhpxuToKbb7qqm5PsxqTOl3oa0NupF9el2dXRJ1yGpvYZCzbZehBIPyroMD S/I0hajK4GA0JjuhsqYEiTCylEw6MfBZsUkSk+q9yMjxUAf9eziUutLG2NLe43e8SJG9 CRog== X-Gm-Message-State: AGi0PubUbY2dwPOR/9831RWauh1RPhl+AlLqXwFXeDeDkzhOHash72Xl QwmiTABxQHYpi4ok2NKHn9s= X-Google-Smtp-Source: APiQypIeb5Li1Za27ifDFVosm3DJ81DLUvhgnhPJUDkQk0EHngILm3m5aFnOmP+SQIsfLYQhZvdmbA== X-Received: by 2002:a17:90a:898d:: with SMTP id v13mr7271426pjn.12.1586370240654; Wed, 08 Apr 2020 11:24:00 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id x75sm17374134pfc.161.2020.04.08.11.23.59 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:24:00 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 09/24] i2c: qup: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:22:56 +0800 Message-Id: <20200408182311.26869-10-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- v1 -> v2: - no changed drivers/i2c/busses/i2c-qup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c index 2d7dabe12723..940e9fcca8ec 100644 --- a/drivers/i2c/busses/i2c-qup.c +++ b/drivers/i2c/busses/i2c-qup.c @@ -1665,7 +1665,6 @@ static int qup_i2c_probe(struct platform_device *pdev) static const int blk_sizes[] = {4, 16, 32}; struct qup_i2c_dev *qup; unsigned long one_bit_t; - struct resource *res; u32 io_mode, hw_ver, size; int ret, fs_div, hs_div; u32 src_clk_freq = DEFAULT_SRC_CLK; @@ -1762,8 +1761,7 @@ static int qup_i2c_probe(struct platform_device *pdev) return -EINVAL; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - qup->base = devm_ioremap_resource(qup->dev, res); + qup->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(qup->base)) return PTR_ERR(qup->base);