Commit 35cce732 authored by Pekka Enberg's avatar Pekka Enberg Committed by Greg Kroah-Hartman

[PATCH] USB: remove LINUX_VERSION_CODE macro usage

This patch removes unnecessary LINUX_VERSION_CODE macro usage from
drivers/usb/.
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e266a124
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#endif #endif
#include <asm/errno.h> #include <asm/errno.h>
#include <linux/version.h>
#include "pwc.h" #include "pwc.h"
#include "pwc-ioctl.h" #include "pwc-ioctl.h"
......
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/version.h>
#include <asm/io.h> #include <asm/io.h>
#include "pwc.h" #include "pwc.h"
...@@ -827,13 +826,10 @@ static int pwc_isoc_init(struct pwc_device *pdev) ...@@ -827,13 +826,10 @@ static int pwc_isoc_init(struct pwc_device *pdev)
/* Get the current alternate interface, adjust packet size */ /* Get the current alternate interface, adjust packet size */
if (!udev->actconfig) if (!udev->actconfig)
return -EFAULT; return -EFAULT;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
idesc = &udev->actconfig->interface[0]->altsetting[pdev->valternate];
#else
intf = usb_ifnum_to_if(udev, 0); intf = usb_ifnum_to_if(udev, 0);
if (intf) if (intf)
idesc = usb_altnum_to_altsetting(intf, pdev->valternate); idesc = usb_altnum_to_altsetting(intf, pdev->valternate);
#endif
if (!idesc) if (!idesc)
return -EFAULT; return -EFAULT;
......
...@@ -37,24 +37,16 @@ ...@@ -37,24 +37,16 @@
#ifndef _SISUSB_H_ #ifndef _SISUSB_H_
#define _SISUSB_H_ #define _SISUSB_H_
#include <linux/version.h>
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,10)
#include <linux/ioctl32.h>
#define SISUSB_OLD_CONFIG_COMPAT
#else
#define SISUSB_NEW_CONFIG_COMPAT #define SISUSB_NEW_CONFIG_COMPAT
#endif #endif
#endif
/* For older kernels, support for text consoles is by default /* For older kernels, support for text consoles is by default
* off. To ensable text console support, change the following: * off. To ensable text console support, change the following:
*/ */
#if 0 #if 0
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,13)
#define CONFIG_USB_SISUSBVGA_CON #define CONFIG_USB_SISUSBVGA_CON
#endif #endif
#endif
/* Version Information */ /* Version Information */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment