* [PATCH] ACPI / hotplug / PCI: Use pci_device_is_present()
@ 2014-03-03 0:19 Rafael J. Wysocki
2014-03-04 8:23 ` Mika Westerberg
0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2014-03-03 0:19 UTC (permalink / raw)
To: Linux PCI
Cc: ACPI Devel Maling List, Bjorn Helgaas, Linux Kernel Mailing List,
Mika Westerberg
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Make the ACPI-based PCI hotplug (ACPIPHP) code use
pci_device_is_present() for checking if devices are present instead
of open coding the same thing.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
On top of current linux-next.
Thanks!
---
drivers/pci/hotplug/acpiphp_glue.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Index: linux-pm/drivers/pci/hotplug/acpiphp_glue.c
===================================================================
--- linux-pm.orig/drivers/pci/hotplug/acpiphp_glue.c
+++ linux-pm/drivers/pci/hotplug/acpiphp_glue.c
@@ -668,12 +668,9 @@ static void trim_stale_devices(struct pc
alive = (ACPI_SUCCESS(status) && device_status_valid(sta))
|| acpiphp_no_hotplug(adev);
}
- if (!alive) {
- u32 v;
+ if (!alive)
+ alive = pci_device_is_present(dev);
- /* Check if the device responds. */
- alive = pci_bus_read_dev_vendor_id(dev->bus, dev->devfn, &v, 0);
- }
if (!alive) {
pci_stop_and_remove_bus_device(dev);
if (adev)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ACPI / hotplug / PCI: Use pci_device_is_present()
2014-03-03 0:19 [PATCH] ACPI / hotplug / PCI: Use pci_device_is_present() Rafael J. Wysocki
@ 2014-03-04 8:23 ` Mika Westerberg
2014-03-05 0:34 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Mika Westerberg @ 2014-03-04 8:23 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux PCI, ACPI Devel Maling List, Bjorn Helgaas,
Linux Kernel Mailing List
On Mon, Mar 03, 2014 at 01:19:25AM +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Make the ACPI-based PCI hotplug (ACPIPHP) code use
> pci_device_is_present() for checking if devices are present instead
> of open coding the same thing.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ACPI / hotplug / PCI: Use pci_device_is_present()
2014-03-04 8:23 ` Mika Westerberg
@ 2014-03-05 0:34 ` Rafael J. Wysocki
0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2014-03-05 0:34 UTC (permalink / raw)
To: Mika Westerberg
Cc: Linux PCI, ACPI Devel Maling List, Bjorn Helgaas,
Linux Kernel Mailing List
On Tuesday, March 04, 2014 10:23:58 AM Mika Westerberg wrote:
> On Mon, Mar 03, 2014 at 01:19:25AM +0100, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > Make the ACPI-based PCI hotplug (ACPIPHP) code use
> > pci_device_is_present() for checking if devices are present instead
> > of open coding the same thing.
> >
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Thanks!
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-05 0:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-03 0:19 [PATCH] ACPI / hotplug / PCI: Use pci_device_is_present() Rafael J. Wysocki
2014-03-04 8:23 ` Mika Westerberg
2014-03-05 0:34 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).