Commit cd0b0ebf authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

Staging: Beceem: remove old kernel compatibility code



This drops compatability for everything from 2.4 to 2.6.35.  Now it only
works on the latest kernel.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c2a0b162
Loading
Loading
Loading
Loading
+1 −14
Original line number Original line Diff line number Diff line
@@ -235,25 +235,14 @@ usbbcm_device_probe(struct usb_interface *intf, const struct usb_device_id *id)
#ifdef CONFIG_PM
#ifdef CONFIG_PM
			udev->autosuspend_delay = 0;
			udev->autosuspend_delay = 0;
			intf->needs_remote_wakeup = 1;
			intf->needs_remote_wakeup = 1;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
			udev->autosuspend_disabled = 0;
#else
			usb_enable_autosuspend(udev);
			usb_enable_autosuspend(udev);
#endif
			device_init_wakeup(&intf->dev, 1);
			device_init_wakeup(&intf->dev, 1);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
			usb_autopm_disable(intf);
#endif
			INIT_WORK(&psIntfAdapter->usbSuspendWork, putUsbSuspend);
			INIT_WORK(&psIntfAdapter->usbSuspendWork, putUsbSuspend);
			BCM_DEBUG_PRINT(psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Enabling USB Auto-Suspend\n");
			BCM_DEBUG_PRINT(psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Enabling USB Auto-Suspend\n");
#endif
#endif
		} else {
		} else {
			intf->needs_remote_wakeup = 0;
			intf->needs_remote_wakeup = 0;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
			udev->autosuspend_disabled = 1;
#else
			usb_disable_autosuspend(udev);
			usb_disable_autosuspend(udev);
#endif
		}
		}
	}
	}


@@ -633,9 +622,7 @@ static int InterfaceResume(struct usb_interface *intf)
	PS_INTERFACE_ADAPTER  psIntfAdapter = usb_get_intfdata(intf);
	PS_INTERFACE_ADAPTER  psIntfAdapter = usb_get_intfdata(intf);
	printk("=================================\n");
	printk("=================================\n");
	mdelay(100);
	mdelay(100);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)

	intf->pm_usage_cnt =1 ;
#endif
	psIntfAdapter->bSuspended = FALSE;
	psIntfAdapter->bSuspended = FALSE;


	StartInterruptUrb(psIntfAdapter);
	StartInterruptUrb(psIntfAdapter);
+0 −11
Original line number Original line Diff line number Diff line
@@ -102,13 +102,8 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/)
	}
	}


err_exit :
err_exit :
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
 	usb_buffer_free(urb->dev, urb->transfer_buffer_length,
 			urb->transfer_buffer, urb->transfer_dma);
#else
	usb_free_coherent(urb->dev, urb->transfer_buffer_length,
	usb_free_coherent(urb->dev, urb->transfer_buffer_length,
 			urb->transfer_buffer, urb->transfer_dma);
 			urb->transfer_buffer, urb->transfer_dma);
#endif
}
}




@@ -139,14 +134,8 @@ static int TransmitTcb(PS_INTERFACE_ADAPTER psIntfAdapter, PUSB_TCB pTcb, PVOID
	struct urb *urb = pTcb->urb;
	struct urb *urb = pTcb->urb;
	int retval = 0;
	int retval = 0;


#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
 	urb->transfer_buffer = usb_buffer_alloc(psIntfAdapter->udev, len,
 						GFP_ATOMIC, &urb->transfer_dma);
#else
	urb->transfer_buffer = usb_alloc_coherent(psIntfAdapter->udev, len,
	urb->transfer_buffer = usb_alloc_coherent(psIntfAdapter->udev, len,
 						GFP_ATOMIC, &urb->transfer_dma);
 						GFP_ATOMIC, &urb->transfer_dma);
#endif

	if (!urb->transfer_buffer)
	if (!urb->transfer_buffer)
	{
	{
		BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_PRINTK, 0, 0, "Error allocating memory\n");
		BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_PRINTK, 0, 0, "Error allocating memory\n");
+0 −2
Original line number Original line Diff line number Diff line
@@ -233,9 +233,7 @@ static int BcmFileDownload(PMINI_ADAPTER Adapter,/**< Logical Adapter */
        goto exit_download;
        goto exit_download;
    }
    }
    oldfs=get_fs();set_fs(get_ds());
    oldfs=get_fs();set_fs(get_ds());
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    vfs_llseek(flp, 0, 0);
    vfs_llseek(flp, 0, 0);
#endif
    set_fs(oldfs);
    set_fs(oldfs);
    if(Adapter->bcm_file_readback_from_chip(Adapter->pvInterfaceAdapter,
    if(Adapter->bcm_file_readback_from_chip(Adapter->pvInterfaceAdapter,
										flp, loc))
										flp, loc))
+0 −2
Original line number Original line Diff line number Diff line
@@ -35,9 +35,7 @@
#include <linux/mm.h>
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/pagemap.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#include <linux/kthread.h>
#include <linux/kthread.h>
#endif
#include <linux/tcp.h>
#include <linux/tcp.h>
#include <linux/udp.h>
#include <linux/udp.h>
#include <linux/usb.h>
#include <linux/usb.h>