diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-18 16:38:46 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-18 16:38:46 +0000 |
commit | 972364b50d8395aadd92193489294c146d9cc0a7 (patch) | |
tree | f37fca14f830b1604db73cdefa6605d7a6aa3b4c | |
parent | f56eaf9328fdfbf64482b22b9014a3e5225f4f2d (diff) | |
download | drakx-972364b50d8395aadd92193489294c146d9cc0a7.tar drakx-972364b50d8395aadd92193489294c146d9cc0a7.tar.gz drakx-972364b50d8395aadd92193489294c146d9cc0a7.tar.bz2 drakx-972364b50d8395aadd92193489294c146d9cc0a7.tar.xz drakx-972364b50d8395aadd92193489294c146d9cc0a7.zip |
simplify (and remove gotos \o/)
-rw-r--r-- | mdk-stage1/probing.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c index 2f5f3b9fc..729ad0b16 100644 --- a/mdk-stage1/probing.c +++ b/mdk-stage1/probing.c @@ -320,43 +320,34 @@ void probe_that_type(enum driver_type type, enum media_bus bus __attribute__ ((u /* ---- PCI probe ---------------------------------------------- */ if (bus != BUS_USB) { - char **pci_modules; - unsigned int pci_modules_len = 0; - switch (type) { #ifndef DISABLE_PCIADAPTERS #ifndef DISABLE_MEDIAS static int already_probed_media_adapters = 0; case MEDIA_ADAPTERS: if (already_probed_media_adapters) - goto end_pci_probe; + break; already_probed_media_adapters = 1; - pci_modules = medias_pci_modules; - pci_modules_len = medias_pci_modules_len; + probe_pci_modules(type, medias_pci_modules, medias_pci_modules_len); break; #endif #ifndef DISABLE_NETWORK case NETWORK_DEVICES: - pci_modules = network_pci_modules; - pci_modules_len = network_pci_modules_len; + probe_pci_modules(type, network_pci_modules, network_pci_modules_len); break; #endif #endif #ifdef ENABLE_USB case USB_CONTROLLERS: if (already_probed_usb_controllers || IS_NOAUTO) - goto end_pci_probe; + break; already_probed_usb_controllers = 1; - pci_modules = usb_controller_modules; - pci_modules_len = usb_controller_modules_len; + probe_pci_modules(type, usb_controller_modules, usb_controller_modules_len); break; #endif default: - goto end_pci_probe; + break; } - - probe_pci_modules(type, pci_modules, pci_modules_len); - end_pci_probe:; } |