git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
usb
/
input
/
yealink.c
diff --git
a/drivers/usb/input/yealink.c
b/drivers/usb/input/yealink.c
index
b1d4fd6
..
caff8e6
100644
(file)
--- a/
drivers/usb/input/yealink.c
+++ b/
drivers/usb/input/yealink.c
@@
-46,15
+46,12
@@
* 20050816 henk Merge 2.6.13-rc6
*/
* 20050816 henk Merge 2.6.13-rc6
*/
-#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
-#include <linux/input.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/rwsem.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/rwsem.h>
-#include <linux/usb.h>
-#include <linux/usb_input.h>
+#include <linux/usb/input.h>
#include "map_to_7segment.h"
#include "yealink.h"
#include "map_to_7segment.h"
#include "yealink.h"
@@
-236,11
+233,10
@@
static int map_p1k_to_key(int scancode)
*
* The key parameter can be cascaded: key2 << 8 | key1
*/
*
* The key parameter can be cascaded: key2 << 8 | key1
*/
-static void report_key(struct yealink_dev *yld, int key
, struct pt_regs *regs
)
+static void report_key(struct yealink_dev *yld, int key)
{
struct input_dev *idev = yld->idev;
{
struct input_dev *idev = yld->idev;
- input_regs(idev, regs);
if (yld->key_code >= 0) {
/* old key up */
input_report_key(idev, yld->key_code & 0xff, 0);
if (yld->key_code >= 0) {
/* old key up */
input_report_key(idev, yld->key_code & 0xff, 0);
@@
-425,7
+421,7
@@
send_update:
* error,start
*
*/
* error,start
*
*/
-static void urb_irq_callback(struct urb *urb
, struct pt_regs *regs
)
+static void urb_irq_callback(struct urb *urb)
{
struct yealink_dev *yld = urb->context;
int ret;
{
struct yealink_dev *yld = urb->context;
int ret;
@@
-442,7
+438,7
@@
static void urb_irq_callback(struct urb *urb, struct pt_regs *regs)
case CMD_SCANCODE:
dbg("get scancode %x", yld->irq_data->data[0]);
case CMD_SCANCODE:
dbg("get scancode %x", yld->irq_data->data[0]);
- report_key(yld, map_p1k_to_key(yld->irq_data->data[0])
, regs
);
+ report_key(yld, map_p1k_to_key(yld->irq_data->data[0]));
break;
default:
break;
default:
@@
-456,7
+452,7
@@
static void urb_irq_callback(struct urb *urb, struct pt_regs *regs)
err("%s - usb_submit_urb failed %d", __FUNCTION__, ret);
}
err("%s - usb_submit_urb failed %d", __FUNCTION__, ret);
}
-static void urb_ctl_callback(struct urb *urb
, struct pt_regs *regs
)
+static void urb_ctl_callback(struct urb *urb)
{
struct yealink_dev *yld = urb->context;
int ret;
{
struct yealink_dev *yld = urb->context;
int ret;
@@
-863,10
+859,8
@@
static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
interface = intf->cur_altsetting;
endpoint = &interface->endpoint[0].desc;
interface = intf->cur_altsetting;
endpoint = &interface->endpoint[0].desc;
- if (!(endpoint->bEndpointAddress & USB_DIR_IN))
- return -EIO;
- if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_INT)
- return -EIO;
+ if (!usb_endpoint_is_int_in(endpoint))
+ return -ENODEV;
yld = kzalloc(sizeof(struct yealink_dev), GFP_KERNEL);
if (!yld)
yld = kzalloc(sizeof(struct yealink_dev), GFP_KERNEL);
if (!yld)
@@
-880,17
+874,17
@@
static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
/* allocate usb buffers */
yld->irq_data = usb_buffer_alloc(udev, USB_PKT_LEN,
/* allocate usb buffers */
yld->irq_data = usb_buffer_alloc(udev, USB_PKT_LEN,
-
SLAB
_ATOMIC, &yld->irq_dma);
+
GFP
_ATOMIC, &yld->irq_dma);
if (yld->irq_data == NULL)
return usb_cleanup(yld, -ENOMEM);
yld->ctl_data = usb_buffer_alloc(udev, USB_PKT_LEN,
if (yld->irq_data == NULL)
return usb_cleanup(yld, -ENOMEM);
yld->ctl_data = usb_buffer_alloc(udev, USB_PKT_LEN,
-
SLAB
_ATOMIC, &yld->ctl_dma);
+
GFP
_ATOMIC, &yld->ctl_dma);
if (!yld->ctl_data)
return usb_cleanup(yld, -ENOMEM);
yld->ctl_req = usb_buffer_alloc(udev, sizeof(*(yld->ctl_req)),
if (!yld->ctl_data)
return usb_cleanup(yld, -ENOMEM);
yld->ctl_req = usb_buffer_alloc(udev, sizeof(*(yld->ctl_req)),
-
SLAB
_ATOMIC, &yld->ctl_req_dma);
+
GFP
_ATOMIC, &yld->ctl_req_dma);
if (yld->ctl_req == NULL)
return usb_cleanup(yld, -ENOMEM);
if (yld->ctl_req == NULL)
return usb_cleanup(yld, -ENOMEM);
@@
-974,7
+968,7
@@
static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
DRIVER_VERSION, sizeof(DRIVER_VERSION));
/* Register sysfs hooks (don't care about failure) */
DRIVER_VERSION, sizeof(DRIVER_VERSION));
/* Register sysfs hooks (don't care about failure) */
- sysfs_create_group(&intf->dev.kobj, &yld_attr_group);
+
ret =
sysfs_create_group(&intf->dev.kobj, &yld_attr_group);
return 0;
}
return 0;
}