Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1654176rwe; Fri, 2 Sep 2022 01:08:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR4W+5pwPvDYD1Fk9ZYv3lAeG2xxHQv6YFthTnkkOwjnzUFMuRIkX0TRHLUJNiNl3biNIioA X-Received: by 2002:a17:90a:a105:b0:1fe:54fd:625a with SMTP id s5-20020a17090aa10500b001fe54fd625amr3631104pjp.69.1662106129023; Fri, 02 Sep 2022 01:08:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662106129; cv=none; d=google.com; s=arc-20160816; b=HIpUtZnwHk9bLwRerL8ZnVKF0SvbpLZLaP3Wvu1WW0956zLul0Hj51mczFJQIYP00o r16AWeE0hzdCm//lYy+QkEQkaLrrXi7JfPfTU2gVr9aLBZmjqD/XKIBnzLs/W/XKqPxb FSA+sLyonE2S8b2gRTQd92xH1rxrBLB5XbLzL6uyk4GaGrxeG2msqOGK59EfQqAOwnnx TUmWSU/UonMLaQ1bHz0rFPHqKrW97jiHF9jET/R3dECODiQf7GjM1jh0S2RRkXbRMRW+ P/CZJJayZujwfUSWsK0Jhwv2foQ2y/Hp2/McuSrU/eH6m60y+1Q5ulbzCOsAgbaAxuXC C4Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=oiHlpQZABH+SiJ1mNXPINGtyw3OIPJX2nkAKt33DAM4=; b=USJx6nklXrVs6XHfpUZLMYU9pn+KIZfiDAtxGgqIvJJaNWkA8rVlqDWsTmY2USCulC r0Hvd4usl8Gyl6MDvaGp1ZFsp89iIe27C6C5Ykp7CBz4GQA06DvyOB5vqOEoB1ffhHeG zusnt2VHGcRNeKo9sfhLvhDw3EPiMiQw7nT3WE3YJ+nrnrLaa9NGUsPfRpDq9ZJOa/Ax T39YYvEhRT7iEoxfZpevIxhf+G5H6LGOELacAEjUpeJGuZUUiR61dRzM4M6+0ritjJNe 32ZLfZr/nFmJ4NZHzTbGWnTon+pMMU+yZVCaT5K9lPuKUxcKCUilVbEuzb8ANdg23cXr Z7Rg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020a17090332d000b00174db5180adsi1552128plr.192.2022.09.02.01.08.38; Fri, 02 Sep 2022 01:08:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235434AbiIBHyM (ORCPT + 99 others); Fri, 2 Sep 2022 03:54:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235476AbiIBHyI (ORCPT ); Fri, 2 Sep 2022 03:54:08 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84F92B69E4 for ; Fri, 2 Sep 2022 00:54:07 -0700 (PDT) Received: from fraeml708-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4MJqsj2nWQz67wrR; Fri, 2 Sep 2022 15:53:29 +0800 (CST) Received: from lhrpeml500003.china.huawei.com (7.191.162.67) by fraeml708-chm.china.huawei.com (10.206.15.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 2 Sep 2022 09:54:05 +0200 Received: from localhost.localdomain (10.69.192.58) by lhrpeml500003.china.huawei.com (7.191.162.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 2 Sep 2022 08:54:03 +0100 From: John Garry To: CC: , , , , , , John Garry Subject: [PATCH v2 2/5] bus: hisi_lpc: Use devm_platform_ioremap_resource Date: Fri, 2 Sep 2022 15:47:18 +0800 Message-ID: <1662104841-55360-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1662104841-55360-1-git-send-email-john.garry@huawei.com> References: <1662104841-55360-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To lhrpeml500003.china.huawei.com (7.191.162.67) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Shevchenko The struct resource is not used for anything else, so we can simplify the code a bit by using the helper function. Signed-off-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Signed-off-by: John Garry --- drivers/bus/hisi_lpc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c index 6d432a07cbba..03d4d96ff794 100644 --- a/drivers/bus/hisi_lpc.c +++ b/drivers/bus/hisi_lpc.c @@ -618,7 +618,6 @@ static int hisi_lpc_probe(struct platform_device *pdev) struct logic_pio_hwaddr *range; struct hisi_lpc_dev *lpcdev; resource_size_t io_end; - struct resource *res; int ret; lpcdev = devm_kzalloc(dev, sizeof(*lpcdev), GFP_KERNEL); @@ -627,8 +626,7 @@ static int hisi_lpc_probe(struct platform_device *pdev) spin_lock_init(&lpcdev->cycle_lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - lpcdev->membase = devm_ioremap_resource(dev, res); + lpcdev->membase = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(lpcdev->membase)) return PTR_ERR(lpcdev->membase); -- 2.35.3