From patchwork Tue Sep 17 17:22:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saiyam Doshi X-Patchwork-Id: 11149233 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1230914DB for ; Tue, 17 Sep 2019 17:22:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E55FE214AF for ; Tue, 17 Sep 2019 17:22:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GO9b8s86" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730949AbfIQRWb (ORCPT ); Tue, 17 Sep 2019 13:22:31 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:34778 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727112AbfIQRWb (ORCPT ); Tue, 17 Sep 2019 13:22:31 -0400 Received: by mail-pl1-f193.google.com with SMTP id d3so1826642plr.1; Tue, 17 Sep 2019 10:22:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=o0LaOrUJw9U8Z2eNdeJ3da2UYwU8tP+swoc6QJzczfc=; b=GO9b8s86YzMd9CJsXnsM5NBWpStpUduvNa5Jkw+9IKCPh6K2l/rYIih02wD5ysEg+D sM0W4GM5rc3fOHFD3IOnJIUBMlV/lREMK5gYImV8HpWNML0SMhGBGYYH3yEAA+P2hqAc UrJMYPsByTMcNw2ff7lcYqbldpm4crvOZtGof4rydstvxkNNnP/1uq4SRAQMY2+3U0yJ BkNMjE0GR8FJpVShIGJiKJzCrnif8YfkCpjxLURISOJB1n16CdgSNfZsah/xQ+jyXA4c U6QeNsts0jUiyS5c1EDqbnlxwjJFXSvXp2q2pcIAvh6iZ6fvhN8Wdkd+YJq52IHEDs+m r4xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=o0LaOrUJw9U8Z2eNdeJ3da2UYwU8tP+swoc6QJzczfc=; b=j3nUPbSrQZwugAR931pm4hJN4VSK/QbuNeJyMFkal451U2RAMi7323DiXFDbczyOKb AkmuQw6qdg0t5lSAgKojz6mmqaLyW7ewq68k9ijF5gaNQ+6f8ubhKjFDq69Q6fozohYJ uulTe4GA8QarSapHQTU5HFJVwZMOppFgw7QTfIzxosdrQ2JB6lMMDhsThK5T5cfi5Ngf pMJCHIABRJl6mXFiRotR8E1CHrzqEjPY0llihbnwKmtiNVwkTP0jR6MvK4mQ3AUKkHPa rq9PvW6yhUREn9jKua6wqx7k+w6DoqbnMFkks0tERSZcl+AAjaQL1wICiaGU860FwW7v BSLg== X-Gm-Message-State: APjAAAU3C5G9RFyR2LNPvDWpXd7qPu9Jlk4I8WWchMfvcwCJrcIFLghC /kH1rlES97spL6BbQLFjIFU= X-Google-Smtp-Source: APXvYqy7rQNQ3sCyATlwlX5P/VxuAokpQVQqUiyz2cStrilET3RW6Cd9BZ/rNFoPIzqVvUBlah+zhA== X-Received: by 2002:a17:902:ba89:: with SMTP id k9mr5013459pls.44.1568740950436; Tue, 17 Sep 2019 10:22:30 -0700 (PDT) Received: from SD ([106.222.12.103]) by smtp.gmail.com with ESMTPSA id d76sm3488179pfd.185.2019.09.17.10.22.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Sep 2019 10:22:30 -0700 (PDT) Date: Tue, 17 Sep 2019 22:52:20 +0530 From: Saiyam Doshi To: agross@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, markus.elfring@web.de Subject: [PATCH v2 3/3] i2c: qup: Use devm_platform_ioremap_resource helper Message-ID: <20190917172220.GA11681@SD> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Simplify the implementation by using a known wrapper function. Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci Signed-off-by: Saiyam Doshi --- Changes in v2: * Updated changelog. drivers/i2c/busses/i2c-qup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.20.1 diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c index ed09a59066b2..2c43ae22162c 100644 --- a/drivers/i2c/busses/i2c-qup.c +++ b/drivers/i2c/busses/i2c-qup.c @@ -1663,7 +1663,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; @@ -1760,8 +1759,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);