From: Hans de Goede <hdegoede@redhat.com>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Linus Walleij <linus.walleij@linaro.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
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 [thread overview]
Message-ID: <20200505132128.19476-3-hdegoede@redhat.com> (raw)
In-Reply-To: <20200505132128.19476-1-hdegoede@redhat.com>
Use the new acpi_evaluate_reg() helper in the acpiphp_glue.c code.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
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)
--
2.26.0
next prev parent reply other threads:[~2020-05-05 13:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 13:21 [PATCH 0/3] ACPI / utils: Add acpi_evaluate_reg() helper Hans de Goede
2020-05-05 13:21 ` [PATCH 1/3] " Hans de Goede
2020-05-05 15:42 ` Andy Shevchenko
2020-05-07 10:30 ` Hans de Goede
2020-05-05 15:43 ` Andy Shevchenko
2020-05-05 16:44 ` Bjorn Helgaas
2020-05-05 13:21 ` Hans de Goede [this message]
2020-05-05 15:41 ` [PATCH 2/3] ACPI / hotplug / PCI: Use the new " Andy Shevchenko
2020-05-05 16:45 ` Bjorn Helgaas
2020-05-05 13:21 ` [PATCH 3/3] pinctrl: cherryview: " Hans de Goede
2020-05-05 15:44 ` Andy Shevchenko
2020-05-05 15:44 ` [PATCH 0/3] ACPI / utils: Add " Andy Shevchenko
2020-05-07 10:22 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200505132128.19476-3-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=lenb@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox