Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp12375498ybl; Sat, 28 Dec 2019 10:55:50 -0800 (PST) X-Google-Smtp-Source: APXvYqwjBTnzeTO/ZrygEInHoimP8wLf9mf2f5xzggWxtqNAa4uAEOAo5E3pUwE+UyBBF2Kks+wA X-Received: by 2002:a9d:798e:: with SMTP id h14mr62162112otm.257.1577559350066; Sat, 28 Dec 2019 10:55:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577559350; cv=none; d=google.com; s=arc-20160816; b=TH1CEWIhFOFdBIHUkrIq/JKqxv+t36p4Ul+LGIcm+p3LoQolKfqIgWbqHeVsZla0gi WvBLbAKadbN3J3rarKtOVyHxaQ+6vecUt0sdLwJ0d9HSR/MvtbF7davsey9SwNshDMbJ IOL1/AB0yHMdXeZ7J6DXQsi9c7vESVn/9upNtPNfq1NE091lsTAXw1MezjYrF+mPIwcj /m5IfK4uUwB7sKxk+kEIc6zKlleJsSpXrScZZCsNj4KDtq+Gtypq+UUWpHHnvTkmPE7Q IAe+ElC9eFfx+Yku+bMSgp4AFFrf17AYUUZIMhy4gY+Bu2oH2ITX8U2kQu0L3ib1BBME eXDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=588nZdPWSQouHjrbTQFmmqqGhpH/jdEr/402TOJdIJc=; b=KkMacAyg04hrOKPHlb7B/hEh6unKwCcV30vjKtCh7T5AstYZfzMVPPF4Ug9vvMaaN3 aOJMZySsEJKMSzOh3fWApoArfhLJCWq/BqAryLA8cwc69go4kg5zMikCMQiz6tGTF/jT ri8rewfBHugpU0kaWBu5zSaNL74F9KLdFFxtma09P9zjviyRVKYvU1JtyzwU94mp5lsw beh9QLOIh6hul3/H2mC6rTMh3cExSUCS49NBC6LeVDCorXblYBww3spgjnb3BeAfIdGB 9M+hz3OJ0o4O19gmtHYSaN31XEkI50Zq32BX8PTm7LNCv+CQZ/0D24f1nUMj098Z0cc/ sRng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KzU+fMIs; 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 x207si18448219oif.30.2019.12.28.10.55.26; Sat, 28 Dec 2019 10:55:50 -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=KzU+fMIs; 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 S1726395AbfL1SyM (ORCPT + 99 others); Sat, 28 Dec 2019 13:54:12 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35502 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbfL1SyM (ORCPT ); Sat, 28 Dec 2019 13:54:12 -0500 Received: by mail-pf1-f194.google.com with SMTP id i23so10923142pfo.2 for ; Sat, 28 Dec 2019 10:54:11 -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; bh=588nZdPWSQouHjrbTQFmmqqGhpH/jdEr/402TOJdIJc=; b=KzU+fMIscpUWow82dmtcE1NqW4BtUv9qlJ/V66IIlkZOW1slFsk8PIok3Yt6Y1Xohd O7rBugj37TUVCItVg94RKD7rHZNospOTzMhKAcuEKkwZetrwVTxS1TAf4zTj9ec0wxZ4 hn2kYpoHyoLA3YvCETC8a3ghKsA4SWv5bCq3lU1ZggIf1PKZVO9iMqZP2XXMa6rxemHB lRUsNUPtrn4bWrL3RwTAev+KCtNaKRPR7RriLMkRIJqs1AGBj5ZWhveSLBPCT2k28NKF 60vsaswEps2QEApSLKcau8AyvC6kp4uWs1QxSu8j370Fz0BlLRes/qnOZC4QIxN6k1r0 05Rg== 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; bh=588nZdPWSQouHjrbTQFmmqqGhpH/jdEr/402TOJdIJc=; b=Fi+HjoO5d2AYQ2KDAtOdOb+h68Yovl4z/NZiBvHTODxRYm2GgaaQiF8NS3GXfvuD9G tj2Gk1apVQl8CBfweq7Eoaza5FwTUxfEmiNs0F7s27OzVMqqkjkgIGj9eOSU9q3L1UFc scfkqH1k/v73DcmR+QJoz6HoIoh8cyD2Ii6uwDPfcvp0fDT2ome9LZPeOmhpsLfwvgdj d8UMXDUKgP/yYGKPDxrPhhwf/JPk7tsEjdia+rPM/HNH+U8nenUFbkslUsgN0W/i/RIK PHq1eORAzSiGm2dhw+A7pG53McRK3e1MORfVWCbpmE5lhjfugokst7zy0UHe/+rCGygU IQLA== X-Gm-Message-State: APjAAAUX/YaZxCHVMXCG8aNF/PSnqJjzTaLG/2z57+QTYYYic428Uin+ KM+J79d4kr4zgxkSN5w2I3U= X-Received: by 2002:a62:4d87:: with SMTP id a129mr61018157pfb.116.1577559251648; Sat, 28 Dec 2019 10:54:11 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id j125sm44497385pfg.160.2019.12.28.10.54.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Dec 2019 10:54:11 -0800 (PST) From: Yangtao Li To: vitor.soares@synopsys.com, bbrezillon@kernel.org, pgaj@cadence.com Cc: linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, Yangtao Li Subject: [PATCH 1/2] i3c: dw: convert to devm_platform_ioremap_resource Date: Sat, 28 Dec 2019 18:54:05 +0000 Message-Id: <20191228185406.26551-1-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 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/i3c/master/dw-i3c-master.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c index b0ff0e12d84c..7b941e93337f 100644 --- a/drivers/i3c/master/dw-i3c-master.c +++ b/drivers/i3c/master/dw-i3c-master.c @@ -1100,15 +1100,13 @@ static const struct i3c_master_controller_ops dw_mipi_i3c_ops = { static int dw_i3c_probe(struct platform_device *pdev) { struct dw_i3c_master *master; - struct resource *res; int ret, irq; master = devm_kzalloc(&pdev->dev, sizeof(*master), GFP_KERNEL); if (!master) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - master->regs = devm_ioremap_resource(&pdev->dev, res); + master->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(master->regs)) return PTR_ERR(master->regs); -- 2.17.1