From patchwork Tue May 5 13:21:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 206962 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FF0FC47254 for ; Tue, 5 May 2020 13:21:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 26EEB2083B for ; Tue, 5 May 2020 13:21:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QxmYFogg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729000AbgEENVr (ORCPT ); Tue, 5 May 2020 09:21:47 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:56884 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728948AbgEENVr (ORCPT ); Tue, 5 May 2020 09:21:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588684906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C62A7ZX2Fzn6OxQtLQ6cG85T/2JvqNh73Sjw5wOf4Z8=; b=QxmYFoggaTCs8eH0/zkKtBjJTN9LPiWIhGP5+kt5D+RBv7KRos8oN8oXY+L6ihRQNVMg6e OZZq/Ah2iM8ilbG2QIe7C4SINHbLaTnuGgekHaRNSNb5KzjmekTh9cHRRKu5eowNKXqzMl 6GGkCR5vgsri3CAvDfbvXGPdn/fCk6A= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-490-1qLHArz8Prq-zst2h12iQw-1; Tue, 05 May 2020 09:21:44 -0400 X-MC-Unique: 1qLHArz8Prq-zst2h12iQw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E35C0107ACF6; Tue, 5 May 2020 13:21:42 +0000 (UTC) Received: from x1.localdomain.com (ovpn-113-21.ams2.redhat.com [10.36.113.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 120236060E; Tue, 5 May 2020 13:21:40 +0000 (UTC) From: Hans de Goede To: "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Mika Westerberg , Andy Shevchenko , Linus Walleij Cc: Hans de Goede , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH 2/3] ACPI / hotplug / PCI: Use the new acpi_evaluate_reg() helper Date: Tue, 5 May 2020 15:21:27 +0200 Message-Id: <20200505132128.19476-3-hdegoede@redhat.com> In-Reply-To: <20200505132128.19476-1-hdegoede@redhat.com> References: <20200505132128.19476-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Use the new acpi_evaluate_reg() helper in the acpiphp_glue.c code. Signed-off-by: Hans de Goede --- drivers/pci/hotplug/acpiphp_glue.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index b3869951c0eb..fd77eb1d460c 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -385,20 +385,11 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus) static void acpiphp_set_acpi_region(struct acpiphp_slot *slot) { struct acpiphp_func *func; - union acpi_object params[2]; - struct acpi_object_list arg_list; - list_for_each_entry(func, &slot->funcs, sibling) { - arg_list.count = 2; - arg_list.pointer = params; - params[0].type = ACPI_TYPE_INTEGER; - params[0].integer.value = ACPI_ADR_SPACE_PCI_CONFIG; - params[1].type = ACPI_TYPE_INTEGER; - params[1].integer.value = 1; - /* _REG is optional, we don't care about if there is failure */ - acpi_evaluate_object(func_to_handle(func), "_REG", &arg_list, - NULL); - } + list_for_each_entry(func, &slot->funcs, sibling) + acpi_evaluate_reg(func_to_handle(func), + ACPI_ADR_SPACE_PCI_CONFIG, + ACPI_REG_CONNECT); } static void check_hotplug_bridge(struct acpiphp_slot *slot, struct pci_dev *dev)