From 972364b50d8395aadd92193489294c146d9cc0a7 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 18 Mar 2008 16:38:46 +0000 Subject: simplify (and remove gotos \o/) --- mdk-stage1/probing.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'mdk-stage1/probing.c') 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:; } -- cgit v1.2.1