Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp938198imw; Fri, 8 Jul 2022 14:51:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tQAUmfvNNKBPuB0lCu3kBnBKsOHsNxeUmWVUfp75Av/tM2EXWM7XtaX0RaUfGQRhIt10Q9 X-Received: by 2002:a63:2c47:0:b0:411:54ab:97b6 with SMTP id s68-20020a632c47000000b0041154ab97b6mr4939413pgs.173.1657317101645; Fri, 08 Jul 2022 14:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657317101; cv=none; d=google.com; s=arc-20160816; b=M1QWzisnyZOI1+mY10RVRGCKF5MkSmveLg9nPrlptUa+PH09g+R5BRfkoUq9IRf1C3 8MQ1I+9nf/2KhYaQnd18P5S6wAcyTZE/vzf+5rVXoKJCReLvYvPMWOm4MrE3Y8GVDn7a txoOdJzscX/6G9zZy+CBtE9hdbOKISXP7dusmxTaN6Eyr+0IPtg0Y2n7jdd6qk9GfLCB MPrOn+eTyIch7saPU1siSmfOKMIoXOHlU3hFglMlRHQqvUgc4kusJytqzN+7op3AY9Bk XjES7vhEAS8f51I6bgYNmxZBDRYy9e7NCqsCjDz4JUZutHR1Gr1jCONkalqAlA7kXlWW oDiQ== 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=1l3Pqa4IZZBeWCe/tyB5uAAEho1DNWYbZwwDaBq2pPQ=; b=JrLraszjCd7LfKVej23E0WEmpo9obUnnulCy7odQ/Vq/9WKPxZLc3/UbpXrv0tTn5h sQt9i2Bs8UlNzfZOWuvDO0NpNTwrPq0EvlTDBhyn1EpS/JzUTH/rVYhscElHAjZxqmOX n7QS9ZWH/Q3d6m29Zpyh3f9y8Ko1SnlqVPoH+Oo/VDPaekOxMMA+mBYKaDrb8EioN7ZX DZTia3ym+u4DAgRMPymPovf9urqIzaqSDQ3Bm+1uRyj45uYv94a5gpEyqr/4hCvjBnIH 1Hi1GiFCsfUGvTkzyRRw5r9h+Cj0ggWvRF5igHwhkooIfP6nwH7pryAZlXwteavxd/9R G3ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K+BQO7Wt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a631b47000000b0040c8f91f3c9si55621455pgm.169.2022.07.08.14.51.29; Fri, 08 Jul 2022 14:51:41 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=K+BQO7Wt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240441AbiGHVJL (ORCPT + 99 others); Fri, 8 Jul 2022 17:09:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240430AbiGHVJB (ORCPT ); Fri, 8 Jul 2022 17:09:01 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CF3F17049 for ; Fri, 8 Jul 2022 14:09:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657314541; x=1688850541; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SetEOGhaWLyaztNH5ao+P5ewqYeiLxGVWkqNFRtt51A=; b=K+BQO7WtN4LcGSJAtPD2BBc1X6IlCWpoEXuN1iOcX1kUz2wO1aynW8IW YIo1wAgO3ClDE6WYePRAvVZk/wenCRns/+dF0exEnFkQAz8vVUAKtzzFW ZpXV1cfrvnBnxOP9hTOBw44lAiIV3Luhij4f/etr8sS8Oqol2NIcRrRaK /bOf1WG14s9XWnOdDDE2l8ZPC+c1J0R2WDx/fXmpXXjU5LSZ3YLX7aSSA wjIu8TjpTpBzypMg0+tlNhaHLDeWl0mrsop2Y5b1fV2mgAm/w4Wchxj8G S3E307ylUK2OxiFOUmH4V+9yZ4LaJGnLnyoyn2woN/wxD2qmiueNSlAxH A==; X-IronPort-AV: E=McAfee;i="6400,9594,10402"; a="283120427" X-IronPort-AV: E=Sophos;i="5.92,256,1650956400"; d="scan'208";a="283120427" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2022 14:08:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,256,1650956400"; d="scan'208";a="544339268" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 08 Jul 2022 14:08:53 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 97277AD; Sat, 9 Jul 2022 00:09:00 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org Cc: john.garry@huawei.com Subject: [PATCH v2 2/4] bus: hisi_lpc: Use devm_platform_ioremap_resource Date: Sat, 9 Jul 2022 00:08:57 +0300 Message-Id: <20220708210859.6774-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220708210859.6774-1-andriy.shevchenko@linux.intel.com> References: <20220708210859.6774-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 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 Acked-by: John Garry Reviewed-by: Rafael J. Wysocki --- v2: added tags 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.1