mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
s390/pci/hotplug: convert to be builtin only
Convert s390' pci hotplug to be builtin only, with no module option. Suggested-by: Bjorn Helgaas <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
This commit is contained in:
parent
0944fe3f4a
commit
67f43f38ee
4 changed files with 20 additions and 101 deletions
|
|
@ -146,7 +146,7 @@ config HOTPLUG_PCI_SGI
|
|||
When in doubt, say N.
|
||||
|
||||
config HOTPLUG_PCI_S390
|
||||
tristate "System z PCI Hotplug Support"
|
||||
bool "System z PCI Hotplug Support"
|
||||
depends on S390 && 64BIT
|
||||
help
|
||||
Say Y here if you want to use the System z PCI Hotplug
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ static struct hotplug_slot_ops s390_hotplug_slot_ops = {
|
|||
.get_adapter_status = get_adapter_status,
|
||||
};
|
||||
|
||||
static int init_pci_slot(struct zpci_dev *zdev)
|
||||
int zpci_init_slot(struct zpci_dev *zdev)
|
||||
{
|
||||
struct hotplug_slot *hotplug_slot;
|
||||
struct hotplug_slot_info *info;
|
||||
|
|
@ -202,7 +202,7 @@ error:
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static void exit_pci_slot(struct zpci_dev *zdev)
|
||||
void zpci_exit_slot(struct zpci_dev *zdev)
|
||||
{
|
||||
struct list_head *tmp, *n;
|
||||
struct slot *slot;
|
||||
|
|
@ -215,60 +215,3 @@ static void exit_pci_slot(struct zpci_dev *zdev)
|
|||
pci_hp_deregister(slot->hotplug_slot);
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_hp_callback_ops hp_ops = {
|
||||
.create_slot = init_pci_slot,
|
||||
.remove_slot = exit_pci_slot,
|
||||
};
|
||||
|
||||
static void __init init_pci_slots(void)
|
||||
{
|
||||
struct zpci_dev *zdev;
|
||||
|
||||
/*
|
||||
* Create a structure for each slot, and register that slot
|
||||
* with the pci_hotplug subsystem.
|
||||
*/
|
||||
mutex_lock(&zpci_list_lock);
|
||||
list_for_each_entry(zdev, &zpci_list, entry) {
|
||||
init_pci_slot(zdev);
|
||||
}
|
||||
mutex_unlock(&zpci_list_lock);
|
||||
}
|
||||
|
||||
static void __exit exit_pci_slots(void)
|
||||
{
|
||||
struct list_head *tmp, *n;
|
||||
struct slot *slot;
|
||||
|
||||
/*
|
||||
* Unregister all of our slots with the pci_hotplug subsystem.
|
||||
* Memory will be freed in release_slot() callback after slot's
|
||||
* lifespan is finished.
|
||||
*/
|
||||
list_for_each_safe(tmp, n, &s390_hotplug_slot_list) {
|
||||
slot = list_entry(tmp, struct slot, slot_list);
|
||||
list_del(&slot->slot_list);
|
||||
pci_hp_deregister(slot->hotplug_slot);
|
||||
}
|
||||
}
|
||||
|
||||
static int __init pci_hotplug_s390_init(void)
|
||||
{
|
||||
if (!s390_pci_probe)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
zpci_register_hp_ops(&hp_ops);
|
||||
init_pci_slots();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit pci_hotplug_s390_exit(void)
|
||||
{
|
||||
exit_pci_slots();
|
||||
zpci_deregister_hp_ops();
|
||||
}
|
||||
|
||||
module_init(pci_hotplug_s390_init);
|
||||
module_exit(pci_hotplug_s390_exit);
|
||||
|
|
|
|||
Loading…
Reference in a new issue