diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2013-06-05 10:06:42 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-06-26 15:10:07 -0400 |
commit | 4bee2a5dce45096851cb8694d962bf8c016816a8 (patch) | |
tree | 282a39310da585ad5e88d57791bfba728ed46280 /arch/s390 | |
parent | 944239c59e93a2a76c0c0dfa473700f82572e17d (diff) |
s390/pci: cleanup hotplug code
Provide wrappers for the [de]configure operations, add some error
handling, and use pci_scan_slot instead of pci_scan_single_device.
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/include/asm/pci.h | 1 | ||||
-rw-r--r-- | arch/s390/pci/pci.c | 19 |
2 files changed, 0 insertions, 20 deletions
diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h index 6c1801235db9..be41f4f885ce 100644 --- a/arch/s390/include/asm/pci.h +++ b/arch/s390/include/asm/pci.h | |||
@@ -143,7 +143,6 @@ int zpci_enable_device(struct zpci_dev *); | |||
143 | int zpci_disable_device(struct zpci_dev *); | 143 | int zpci_disable_device(struct zpci_dev *); |
144 | void zpci_stop_device(struct zpci_dev *); | 144 | void zpci_stop_device(struct zpci_dev *); |
145 | void zpci_free_device(struct zpci_dev *); | 145 | void zpci_free_device(struct zpci_dev *); |
146 | int zpci_scan_device(struct zpci_dev *); | ||
147 | int zpci_register_ioat(struct zpci_dev *, u8, u64, u64, u64); | 146 | int zpci_register_ioat(struct zpci_dev *, u8, u64, u64, u64); |
148 | int zpci_unregister_ioat(struct zpci_dev *, u8); | 147 | int zpci_unregister_ioat(struct zpci_dev *, u8); |
149 | 148 | ||
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index a56fce445c39..628769b91b97 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c | |||
@@ -974,25 +974,6 @@ void zpci_stop_device(struct zpci_dev *zdev) | |||
974 | } | 974 | } |
975 | EXPORT_SYMBOL_GPL(zpci_stop_device); | 975 | EXPORT_SYMBOL_GPL(zpci_stop_device); |
976 | 976 | ||
977 | int zpci_scan_device(struct zpci_dev *zdev) | ||
978 | { | ||
979 | zdev->pdev = pci_scan_single_device(zdev->bus, ZPCI_DEVFN); | ||
980 | if (!zdev->pdev) { | ||
981 | pr_err("pci_scan_single_device failed for fid: 0x%x\n", | ||
982 | zdev->fid); | ||
983 | goto out; | ||
984 | } | ||
985 | |||
986 | pci_bus_add_devices(zdev->bus); | ||
987 | |||
988 | return 0; | ||
989 | out: | ||
990 | zpci_dma_exit_device(zdev); | ||
991 | clp_disable_fh(zdev); | ||
992 | return -EIO; | ||
993 | } | ||
994 | EXPORT_SYMBOL_GPL(zpci_scan_device); | ||
995 | |||
996 | static inline int barsize(u8 size) | 977 | static inline int barsize(u8 size) |
997 | { | 978 | { |
998 | return (size) ? (1 << size) >> 10 : 0; | 979 | return (size) ? (1 << size) >> 10 : 0; |