ACPIPHP / radeon / nouveau: Remove acpi_bus_no_hotplug()
Revert parts of f244d8b623
("ACPIPHP / radeon / nouveau: Fix VGA
switcheroo problem related to hotplug").
A previous commit 5493b31f0b55 ("PCI: Add pci_ignore_hotplug() to ignore
hotplug events for a device") added equivalent functionality implemented in
a different way for both acpiphp and pciehp.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Rajat Jain <rajatxjain@gmail.com>
This commit is contained in:
@@ -46,7 +46,6 @@ static struct nouveau_dsm_priv {
|
||||
bool dsm_detected;
|
||||
bool optimus_detected;
|
||||
acpi_handle dhandle;
|
||||
acpi_handle other_handle;
|
||||
acpi_handle rom_handle;
|
||||
} nouveau_dsm_priv;
|
||||
|
||||
@@ -222,10 +221,9 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev)
|
||||
if (!dhandle)
|
||||
return false;
|
||||
|
||||
if (!acpi_has_method(dhandle, "_DSM")) {
|
||||
nouveau_dsm_priv.other_handle = dhandle;
|
||||
if (!acpi_has_method(dhandle, "_DSM"))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (acpi_check_dsm(dhandle, nouveau_dsm_muid, 0x00000102,
|
||||
1 << NOUVEAU_DSM_POWER))
|
||||
retval |= NOUVEAU_DSM_HAS_MUX;
|
||||
@@ -301,16 +299,6 @@ static bool nouveau_dsm_detect(void)
|
||||
printk(KERN_INFO "VGA switcheroo: detected DSM switching method %s handle\n",
|
||||
acpi_method_name);
|
||||
nouveau_dsm_priv.dsm_detected = true;
|
||||
/*
|
||||
* On some systems hotplug events are generated for the device
|
||||
* being switched off when _DSM is executed. They cause ACPI
|
||||
* hotplug to trigger and attempt to remove the device from
|
||||
* the system, which causes it to break down. Prevent that from
|
||||
* happening by setting the no_hotplug flag for the involved
|
||||
* ACPI device objects.
|
||||
*/
|
||||
acpi_bus_no_hotplug(nouveau_dsm_priv.dhandle);
|
||||
acpi_bus_no_hotplug(nouveau_dsm_priv.other_handle);
|
||||
ret = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user