aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/pci
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/pci')
-rw-r--r--arch/s390/pci/pci.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index aa74409db656..27b4c17855b9 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -51,8 +51,7 @@ EXPORT_SYMBOL_GPL(zpci_list);
51DEFINE_MUTEX(zpci_list_lock); 51DEFINE_MUTEX(zpci_list_lock);
52EXPORT_SYMBOL_GPL(zpci_list_lock); 52EXPORT_SYMBOL_GPL(zpci_list_lock);
53 53
54struct pci_hp_callback_ops hotplug_ops; 54static struct pci_hp_callback_ops *hotplug_ops;
55EXPORT_SYMBOL_GPL(hotplug_ops);
56 55
57static DECLARE_BITMAP(zpci_domain, ZPCI_NR_DEVICES); 56static DECLARE_BITMAP(zpci_domain, ZPCI_NR_DEVICES);
58static DEFINE_SPINLOCK(zpci_domain_lock); 57static DEFINE_SPINLOCK(zpci_domain_lock);
@@ -974,8 +973,8 @@ int zpci_create_device(struct zpci_dev *zdev)
974 973
975 mutex_lock(&zpci_list_lock); 974 mutex_lock(&zpci_list_lock);
976 list_add_tail(&zdev->entry, &zpci_list); 975 list_add_tail(&zdev->entry, &zpci_list);
977 if (hotplug_ops.create_slot) 976 if (hotplug_ops)
978 hotplug_ops.create_slot(zdev); 977 hotplug_ops->create_slot(zdev);
979 mutex_unlock(&zpci_list_lock); 978 mutex_unlock(&zpci_list_lock);
980 979
981 if (zdev->state == ZPCI_FN_STATE_STANDBY) 980 if (zdev->state == ZPCI_FN_STATE_STANDBY)
@@ -989,8 +988,8 @@ int zpci_create_device(struct zpci_dev *zdev)
989out_start: 988out_start:
990 mutex_lock(&zpci_list_lock); 989 mutex_lock(&zpci_list_lock);
991 list_del(&zdev->entry); 990 list_del(&zdev->entry);
992 if (hotplug_ops.remove_slot) 991 if (hotplug_ops)
993 hotplug_ops.remove_slot(zdev); 992 hotplug_ops->remove_slot(zdev);
994 mutex_unlock(&zpci_list_lock); 993 mutex_unlock(&zpci_list_lock);
995out_bus: 994out_bus:
996 zpci_free_domain(zdev); 995 zpci_free_domain(zdev);
@@ -1072,6 +1071,22 @@ static void zpci_mem_exit(void)
1072 kmem_cache_destroy(zdev_fmb_cache); 1071 kmem_cache_destroy(zdev_fmb_cache);
1073} 1072}
1074 1073
1074void zpci_register_hp_ops(struct pci_hp_callback_ops *ops)
1075{
1076 mutex_lock(&zpci_list_lock);
1077 hotplug_ops = ops;
1078 mutex_unlock(&zpci_list_lock);
1079}
1080EXPORT_SYMBOL_GPL(zpci_register_hp_ops);
1081
1082void zpci_deregister_hp_ops(void)
1083{
1084 mutex_lock(&zpci_list_lock);
1085 hotplug_ops = NULL;
1086 mutex_unlock(&zpci_list_lock);
1087}
1088EXPORT_SYMBOL_GPL(zpci_deregister_hp_ops);
1089
1075unsigned int s390_pci_probe = 1; 1090unsigned int s390_pci_probe = 1;
1076EXPORT_SYMBOL_GPL(s390_pci_probe); 1091EXPORT_SYMBOL_GPL(s390_pci_probe);
1077 1092