Message ID | 20200505132128.19476-3-hdegoede@redhat.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | ACPI / utils: Add acpi_evaluate_reg() helper | expand |
On Tue, May 05, 2020 at 03:21:27PM +0200, Hans de Goede wrote: > Use the new acpi_evaluate_reg() helper in the acpiphp_glue.c code. > - /* _REG is optional, we don't care about if there is failure */ This may be left.
On Tue, May 05, 2020 at 03:21:27PM +0200, Hans de Goede wrote: > Use the new acpi_evaluate_reg() helper in the acpiphp_glue.c code. > > Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> OK by me if this is merged with the first. > --- > 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 >
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)
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(-)