acpiphp: use new dock driver
PATCH 6/13 acpiphp: use new dock driver
From: Kristen Accardi <[email protected]>
Modify the acpiphp driver to use the acpi dock driver for dock notifications. Only load the acpiphp driver if we find we have pci dock devices
[[email protected]: handle_hotplug_event_func() can now become static]
Signed-off-by Kristen Carlson Accardi <[email protected]>
Signed-off-by Adrian Bunk <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/pci/hotplug/Makefile | 3 drivers/pci/hotplug/acpiphp.h | 35 -- drivers/pci/hotplug/acpiphp_core.c | 19 - drivers/pci/hotplug/acpiphp_dock.c | 438 --------------------------- drivers/pci/hotplug/acpiphp_glue.c | 111 +++++- 5 files changed, 87 insertions(+), 519 deletions(-)
drivers/pci/hotplug/acpiphp_core.c renamed from drivers/pci/hotplug/acpiphp_core.c~acpiphp-use-new-dock-driver +1 -18
@@ -416,27 +416,12 @@ void acpiphp_unregister_hotplug_slot(strstatic int __init acpiphp_init (void ) { -int retval; -int docking_station; -info (DRIVER_DESC " version: " DRIVER_VERSION "\n" ); acpiphp_debug = debug; - docking_station =find_dock_station (); -/* read all the ACPI info from the system */ - retval =init_acpi (); - -/* if we have found a docking station, we should -* go ahead and load even if init_acpi has found -* no slots. This handles the case when the _DCK -* method not defined under the actual dock bridge -*/ -if (docking_station) -return 0 ; -else -return retval; +return init_acpi (); }
@@ -444,8 +429,6 @@ static void __exit acpiphp_exit(void) {/* deallocate internal data structures etc. */ acpiphp_glue_exit (); - -remove_dock_station (); }module_init (acpiphp_init);
drivers/pci/hotplug/acpiphp_dock.c deleted +0 -438
438 lines not on this page · raw message
drivers/pci/hotplug/acpiphp_glue.c renamed from drivers/pci/hotplug/acpiphp_glue.c~acpiphp-use-new-dock-driver +84 -27
162 lines not on this page · raw message
drivers/pci/hotplug/acpiphp.h renamed from drivers/pci/hotplug/acpiphp.h~acpiphp-use-new-dock-driver +1 -34
@@ -125,7 +125,7 @@ struct acpiphp_func {struct list_head sibling;struct pci_dev *pci_dev; - +struct notifier_block nb;acpi_handle handle;u8 function;/* pci function# */
@@ -146,24 +146,6 @@ struct acpiphp_attention_info }; -struct dependent_device { -struct list_head device_list; -struct list_head pci_list; -acpi_handle handle; -struct acpiphp_func *func; -}; - - -struct acpiphp_dock_station { -acpi_handle handle; -u32 last_dock_time; -u32 flags; -struct acpiphp_func *dock_bridge; -struct list_head dependent_devices; -struct list_head pci_dependent_devices; -}; - -/* PCI bus bridge HID */ #define ACPI_PCI_HOST_HID "PNP0A03"
@@ -202,11 +184,6 @@ struct acpiphp_dock_station {#define FUNC_HAS_PS2 (0x00000040)#define FUNC_HAS_PS3 (0x00000080)#define FUNC_HAS_DCK (0x00000100) -#define FUNC_IS_DD (0x00000200) - -/* dock station flags */ -#define DOCK_DOCKING (0x00000001) -#define DOCK_HAS_BRIDGE (0x00000002)/* function prototypes */
@@ -231,16 +208,6 @@ extern u8 acpiphp_get_latch_status (struextern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot);extern u32 acpiphp_get_address (struct acpiphp_slot *slot); -/* acpiphp_dock.c */ -extern int find_dock_station (void ); -extern void remove_dock_station (void ); -extern void add_dependent_device (struct dependent_device *new_dd); -extern void add_pci_dependent_device (struct dependent_device *new_dd); -extern struct dependent_device *get_dependent_device (acpi_handle handle); -extern int is_dependent_device (acpi_handle handle); -extern int detect_dependent_devices (acpi_handle *bridge_handle); -extern struct dependent_device *alloc_dependent_device (acpi_handle handle); -/* variables */ extern int acpiphp_debug;
drivers/pci/hotplug/Makefile renamed from drivers/pci/hotplug/Makefile~acpiphp-use-new-dock-driver +1 -2
@@ -40,8 +40,7 @@ ibmphp-objs := ibmphp_core.o \ ibmphp_hpc.o acpiphp-objs := acpiphp_core.o \ - acpiphp_glue.o \ - acpiphp_dock.o + acpiphp_glue.o rpaphp-objs := rpaphp_core.o \ rpaphp_pci.o \
_