diff options
Diffstat (limited to 'drivers/usb/misc/sisusbvga')
| -rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb.c | 5 | ||||
| -rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb.h | 8 |
2 files changed, 2 insertions, 11 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 3260d595441f..196c8794a73c 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c | |||
| @@ -3188,7 +3188,7 @@ sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
| 3188 | break; | 3188 | break; |
| 3189 | 3189 | ||
| 3190 | default: | 3190 | default: |
| 3191 | retval = -EINVAL; | 3191 | retval = -ENOTTY; |
| 3192 | break; | 3192 | break; |
| 3193 | } | 3193 | } |
| 3194 | 3194 | ||
| @@ -3251,12 +3251,11 @@ static int sisusb_probe(struct usb_interface *intf, | |||
| 3251 | dev->devnum); | 3251 | dev->devnum); |
| 3252 | 3252 | ||
| 3253 | /* Allocate memory for our private */ | 3253 | /* Allocate memory for our private */ |
| 3254 | if (!(sisusb = kmalloc(sizeof(*sisusb), GFP_KERNEL))) { | 3254 | if (!(sisusb = kzalloc(sizeof(*sisusb), GFP_KERNEL))) { |
| 3255 | printk(KERN_ERR | 3255 | printk(KERN_ERR |
| 3256 | "sisusb: Failed to allocate memory for private data\n"); | 3256 | "sisusb: Failed to allocate memory for private data\n"); |
| 3257 | return -ENOMEM; | 3257 | return -ENOMEM; |
| 3258 | } | 3258 | } |
| 3259 | memset(sisusb, 0, sizeof(*sisusb)); | ||
| 3260 | kref_init(&sisusb->kref); | 3259 | kref_init(&sisusb->kref); |
| 3261 | 3260 | ||
| 3262 | init_MUTEX(&(sisusb->lock)); | 3261 | init_MUTEX(&(sisusb->lock)); |
diff --git a/drivers/usb/misc/sisusbvga/sisusb.h b/drivers/usb/misc/sisusbvga/sisusb.h index 1d7a77cc7c4a..a716825d1f9b 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.h +++ b/drivers/usb/misc/sisusbvga/sisusb.h | |||
| @@ -37,24 +37,16 @@ | |||
| 37 | #ifndef _SISUSB_H_ | 37 | #ifndef _SISUSB_H_ |
| 38 | #define _SISUSB_H_ | 38 | #define _SISUSB_H_ |
| 39 | 39 | ||
| 40 | #include <linux/version.h> | ||
| 41 | #ifdef CONFIG_COMPAT | 40 | #ifdef CONFIG_COMPAT |
| 42 | #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,10) | ||
| 43 | #include <linux/ioctl32.h> | ||
| 44 | #define SISUSB_OLD_CONFIG_COMPAT | ||
| 45 | #else | ||
| 46 | #define SISUSB_NEW_CONFIG_COMPAT | 41 | #define SISUSB_NEW_CONFIG_COMPAT |
| 47 | #endif | 42 | #endif |
| 48 | #endif | ||
| 49 | 43 | ||
| 50 | /* For older kernels, support for text consoles is by default | 44 | /* For older kernels, support for text consoles is by default |
| 51 | * off. To ensable text console support, change the following: | 45 | * off. To ensable text console support, change the following: |
| 52 | */ | 46 | */ |
| 53 | #if 0 | 47 | #if 0 |
| 54 | #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,13) | ||
| 55 | #define CONFIG_USB_SISUSBVGA_CON | 48 | #define CONFIG_USB_SISUSBVGA_CON |
| 56 | #endif | 49 | #endif |
| 57 | #endif | ||
| 58 | 50 | ||
| 59 | /* Version Information */ | 51 | /* Version Information */ |
| 60 | 52 | ||
