patch-2.3.99-pre7 linux/drivers/usb/usb-uhci.c

Next file: linux/drivers/usb/usb.c
Previous file: linux/drivers/usb/usb-storage.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/usb/usb-uhci.c linux/drivers/usb/usb-uhci.c
@@ -29,9 +29,7 @@
 #include <linux/interrupt.h>	/* for in_interrupt() */
 #include <linux/init.h>
 #include <linux/version.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,44)
 #include <linux/pm.h>
-#endif
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -2634,7 +2632,6 @@
 	return 0;
 }
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,44)
 _static int handle_pm_event (struct pm_dev *dev, pm_request_t rqst, void *data)
 {
 	uhci_t *s = (uhci_t*) dev->data;
@@ -2651,7 +2648,6 @@
 	}
 	return 0;
 }
-#endif
 
 _static int __init alloc_uhci (struct pci_dev *dev, int irq, unsigned int io_addr, unsigned int io_size)
 {
@@ -2754,11 +2750,11 @@
 
 	//chain new uhci device into global list
 	devs = s;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,44)
+
 	pmdev = pm_register(PM_PCI_DEV, PM_PCI_ID(dev), handle_pm_event);
 	if (pmdev)
 		pmdev->data = s;
-#endif
+
 	return 0;
 }
 
@@ -2768,19 +2764,12 @@
 
 	/* Search for the IO base address.. */
 	for (i = 0; i < 6; i++) {
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,8)
+
 		unsigned int io_addr = dev->resource[i].start;
 		unsigned int io_size =
 		dev->resource[i].end - dev->resource[i].start + 1;
 		if (!(dev->resource[i].flags & 1))
 			continue;
-#else
-		unsigned int io_addr = dev->base_address[i];
-		unsigned int io_size = 0x14;
-		if (!(io_addr & 1))
-			continue;
-		io_addr &= ~1;
-#endif
 
 		/* Is it already in use? */
 		if (check_region (io_addr, io_size))
@@ -2835,10 +2824,10 @@
 		if (type != 0)
 			continue;
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,8)
+
 		if (pci_enable_device (dev) < 0)
 			continue;
-#endif
+
 		if(!dev->irq)
 		{
 			err("Found UHCI device with no IRQ assigned. Check BIOS settings!");
@@ -2879,9 +2868,7 @@
 
 void cleanup_module (void)
 {
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,44)
 	pm_unregister_all (handle_pm_event);
-#endif
 	uhci_cleanup ();
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)