Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3527172rwb; Tue, 16 Aug 2022 04:50:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR4D39wVa9ypE8AZGc8bRg9TnzsMpxZlcgRGub/zRYWqLECftH5lxkfa9EvDDB175oFOV0+u X-Received: by 2002:a17:903:2341:b0:16e:e205:bb3a with SMTP id c1-20020a170903234100b0016ee205bb3amr20806141plh.10.1660650627921; Tue, 16 Aug 2022 04:50:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660650627; cv=none; d=google.com; s=arc-20160816; b=j9FOKdWoErNzMwozgaIxbz5Mn9rbdgnpgPBrh/CODwTmxi2pq7Uyqsw6rI+dnFK1Uj wpfwBfhM9D0xmg+cNyOqbmEY5EoxzWOW08DhAiBJ2wjAMzp2aKkucK7lHFaaqqwudwP1 8Eh4tGc+M0+t3YbHsDtGKbJ9MnUn3ST9/wN1CMKTQvMSBdsjGBnKi59xwXwABsWyS+9e ujdOUYv49VNO0HxvkDlqreoSoaEC3GLvVDPrDNLtGOEORFyMDoQoz+piuAO1knWKnz2c IxC5A72ZVl5ErmTfG6zTxH4Ht/3KeISqBEfAyXABVWXqsqVoa0E+KO/fdbjHIoR3Cgp5 EJ5A== 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=wnKzlDO/sEQZTscUCjAF6r9O7VM3K8lpaDimUCUvR3Y=; b=ZH/HLefOmdl0UttRFNx3Cw3fYtD+kWSu3aYxxMuL4m69m1TfrJ3bOh3+Mi9EinChRe /uFjP1xcrj6Niz/4sh569CsPoAX4XLfk5F7kfbiYKzVbLyHN2np5s5uodd1MoGVoknTM zCR2LOH+jXy8AIX4jeU/Crtn7NpW40PIp8BppDyhEoiA8l/GK34Oz0RCqEtlr5t+htZd ld4guSuewQC/YW7Vm+j2JgjoyYDxbkDvXEIlFAM+S8kpihMAR2dKUyiRD/eWPj/fAn/Q 4Uxvsj9HvrOnJZe/gawYOxAzaEZ04ldjgjsuyUNNx99KWyqQILJoNfl7zR1pzx3vQpdp 5uGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XjpaOGbU; 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 4-20020a621604000000b00534be09c9desi7112686pfw.303.2022.08.16.04.50.17; Tue, 16 Aug 2022 04:50:27 -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=XjpaOGbU; 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 S233594AbiHPKup (ORCPT + 99 others); Tue, 16 Aug 2022 06:50:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234722AbiHPKuT (ORCPT ); Tue, 16 Aug 2022 06:50:19 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62ECC11C37; Tue, 16 Aug 2022 03:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660644995; x=1692180995; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CZpVmaySJKsjTz2SEFDxIwCpiRQ3ZlOuaduB9ahdSIc=; b=XjpaOGbUhv+FoCa3Jjs4AVyUEo6Mx88MuwmuI8up35fif3k/FaBxcBPE nyLhzyxOusvvS1Zo23TFU3WKX67xjVwHZyok14U2AWnzg7gROOveGZ5VH uQP6aPDvWwwmP3wek4Qc5O/ZOP66gn/a8PfBAGqIB3ZmeFiD/bFAuNf+P mzJvmvZlAjAtw8EDgqsCKOve/U/BrfcYbzPNlbRqwEdlrED0DueXNPL+E ZxRf+K4ok3uAq3NvxWAxNNfPIfBPCB886smpuKm2AM0/AqF/6N92HPIY1 kE7xL4b2pj+PVZCtXZH+WMo7DelhLY5odAm3xCO/GAadPuQrLQdR+qehp Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10440"; a="279141292" X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="279141292" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2022 03:16:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="749260787" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 16 Aug 2022 03:16:29 -0700 From: Heikki Krogerus To: "Rafael J. Wysocki" , Greg Kroah-Hartman Cc: Utkarsh Patel , rajmohan.mani@intel.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH 5/6] ACPI: LPSS: Use the helper acpi_dev_get_memory_resources() Date: Tue, 16 Aug 2022 13:16:28 +0300 Message-Id: <20220816101629.69054-6-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220816101629.69054-1-heikki.krogerus@linux.intel.com> References: <20220816101629.69054-1-heikki.krogerus@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 It removes the need to check the resource data type separately. Signed-off-by: Heikki Krogerus --- drivers/acpi/acpi_lpss.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index c4d4d21391d7b..4f6cba8fe8def 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -392,13 +392,6 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = { #ifdef CONFIG_X86_INTEL_LPSS -static int is_memory(struct acpi_resource *res, void *not_used) -{ - struct resource r; - - return !acpi_dev_resource_memory(res, &r); -} - /* LPSS main clock device. */ static struct platform_device *lpss_clk_dev; @@ -659,7 +652,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev, return -ENOMEM; INIT_LIST_HEAD(&resource_list); - ret = acpi_dev_get_resources(adev, &resource_list, is_memory, NULL); + ret = acpi_dev_get_memory_resources(adev, &resource_list); if (ret < 0) goto err_out; -- 2.35.1