diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-07-24 22:43:04 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-07-24 22:43:04 -0700 |
commit | 314820c9e892d8f41ba4db300ec96770d9c8294b (patch) | |
tree | 3d5c59a429239b180c77e57f998a78d3f2b79827 /drivers/input/joystick | |
parent | e76b8ee25e034ab601b525abb95cea14aa167ed3 (diff) | |
parent | 07b8481d4aff73d6f451f25e74ea10240ff5131e (diff) | |
download | linux-314820c9e892d8f41ba4db300ec96770d9c8294b.tar.gz linux-314820c9e892d8f41ba4db300ec96770d9c8294b.tar.bz2 linux-314820c9e892d8f41ba4db300ec96770d9c8294b.zip |
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r-- | drivers/input/joystick/as5011.c | 1 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-main.c | 3 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-packets.c | 16 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-usb.c | 18 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce.h | 1 | ||||
-rw-r--r-- | drivers/input/joystick/xpad.c | 35 |
6 files changed, 50 insertions, 24 deletions
diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c index feeefcb09e78..c96653b58867 100644 --- a/drivers/input/joystick/as5011.c +++ b/drivers/input/joystick/as5011.c @@ -231,6 +231,7 @@ static int __devinit as5011_probe(struct i2c_client *client, } if (!i2c_check_functionality(client->adapter, + I2C_FUNC_NOSTART | I2C_FUNC_PROTOCOL_MANGLING)) { dev_err(&client->dev, "need i2c bus that supports protocol mangling\n"); diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index 405febd94f24..daeeb4c7e3b0 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c @@ -317,7 +317,8 @@ int iforce_init_device(struct iforce *iforce) break; if (i == 20) { /* 5 seconds */ - err("Timeout waiting for response from device."); + dev_err(&input_dev->dev, + "Timeout waiting for response from device.\n"); error = -ENODEV; goto fail; } diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index a17b50016009..08f98f2eaf88 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -257,7 +257,8 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC); if (status) { - err("usb_submit_urb failed %d", status); + dev_err(&iforce->intf->dev, + "usb_submit_urb failed %d\n", status); return -1; } @@ -265,12 +266,14 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) iforce->ctrl->status != -EINPROGRESS, HZ); if (iforce->ctrl->status) { - dbg("iforce->ctrl->status = %d", iforce->ctrl->status); + dev_dbg(&iforce->intf->dev, + "iforce->ctrl->status = %d\n", + iforce->ctrl->status); usb_unlink_urb(iforce->ctrl); return -1; } #else - dbg("iforce_get_id_packet: iforce->bus = USB!"); + printk(KERN_DEBUG "iforce_get_id_packet: iforce->bus = USB!\n"); #endif } break; @@ -289,12 +292,15 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) return -1; } #else - err("iforce_get_id_packet: iforce->bus = SERIO!"); + dev_err(&iforce->dev->dev, + "iforce_get_id_packet: iforce->bus = SERIO!\n"); #endif break; default: - err("iforce_get_id_packet: iforce->bus = %d", iforce->bus); + dev_err(&iforce->dev->dev, + "iforce_get_id_packet: iforce->bus = %d\n", + iforce->bus); break; } diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index 6c96631ae5d9..d96aa27dfcdc 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c @@ -64,7 +64,7 @@ void iforce_usb_xmit(struct iforce *iforce) if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) { clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); - dev_warn(&iforce->dev->dev, "usb_submit_urb failed %d\n", n); + dev_warn(&iforce->intf->dev, "usb_submit_urb failed %d\n", n); } /* The IFORCE_XMIT_RUNNING bit is not cleared here. That's intended. @@ -76,6 +76,7 @@ void iforce_usb_xmit(struct iforce *iforce) static void iforce_usb_irq(struct urb *urb) { struct iforce *iforce = urb->context; + struct device *dev = &iforce->intf->dev; int status; switch (urb->status) { @@ -86,11 +87,12 @@ static void iforce_usb_irq(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", - __func__, urb->status); + dev_dbg(dev, "%s - urb shutting down with status: %d\n", + __func__, urb->status); return; default: - dbg("%s - urb has status of: %d", __func__, urb->status); + dev_dbg(dev, "%s - urb has status of: %d\n", + __func__, urb->status); goto exit; } @@ -100,8 +102,8 @@ static void iforce_usb_irq(struct urb *urb) exit: status = usb_submit_urb (urb, GFP_ATOMIC); if (status) - err ("%s - usb_submit_urb failed with result %d", - __func__, status); + dev_err(dev, "%s - usb_submit_urb failed with result %d\n", + __func__, status); } static void iforce_usb_out(struct urb *urb) @@ -110,7 +112,8 @@ static void iforce_usb_out(struct urb *urb) if (urb->status) { clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); - dbg("urb->status %d, exiting", urb->status); + dev_dbg(&iforce->intf->dev, "urb->status %d, exiting\n", + urb->status); return; } @@ -155,6 +158,7 @@ static int iforce_usb_probe(struct usb_interface *intf, iforce->bus = IFORCE_USB; iforce->usbdev = dev; + iforce->intf = intf; iforce->cr.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE; iforce->cr.wIndex = 0; diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h index 9f494b75848a..b1d7d9b0eb86 100644 --- a/drivers/input/joystick/iforce/iforce.h +++ b/drivers/input/joystick/iforce/iforce.h @@ -115,6 +115,7 @@ struct iforce { #endif #ifdef CONFIG_JOYSTICK_IFORCE_USB struct usb_device *usbdev; /* USB transfer */ + struct usb_interface *intf; struct urb *irq, *out, *ctrl; struct usb_ctrlrequest cr; #endif diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 42f7b257feb0..83811e45d633 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -256,6 +256,7 @@ MODULE_DEVICE_TABLE (usb, xpad_table); struct usb_xpad { struct input_dev *dev; /* input device interface */ struct usb_device *udev; /* usb device */ + struct usb_interface *intf; /* usb interface */ int pad_present; @@ -461,6 +462,7 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha static void xpad_irq_in(struct urb *urb) { struct usb_xpad *xpad = urb->context; + struct device *dev = &xpad->intf->dev; int retval, status; status = urb->status; @@ -473,11 +475,11 @@ static void xpad_irq_in(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", + dev_dbg(dev, "%s - urb shutting down with status: %d\n", __func__, status); return; default: - dbg("%s - nonzero urb status received: %d", + dev_dbg(dev, "%s - nonzero urb status received: %d\n", __func__, status); goto exit; } @@ -496,12 +498,15 @@ static void xpad_irq_in(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - err ("%s - usb_submit_urb failed with result %d", - __func__, retval); + dev_err(dev, "%s - usb_submit_urb failed with result %d\n", + __func__, retval); } static void xpad_bulk_out(struct urb *urb) { + struct usb_xpad *xpad = urb->context; + struct device *dev = &xpad->intf->dev; + switch (urb->status) { case 0: /* success */ @@ -510,16 +515,20 @@ static void xpad_bulk_out(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", __func__, urb->status); + dev_dbg(dev, "%s - urb shutting down with status: %d\n", + __func__, urb->status); break; default: - dbg("%s - nonzero urb status received: %d", __func__, urb->status); + dev_dbg(dev, "%s - nonzero urb status received: %d\n", + __func__, urb->status); } } #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) static void xpad_irq_out(struct urb *urb) { + struct usb_xpad *xpad = urb->context; + struct device *dev = &xpad->intf->dev; int retval, status; status = urb->status; @@ -533,19 +542,21 @@ static void xpad_irq_out(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", __func__, status); + dev_dbg(dev, "%s - urb shutting down with status: %d\n", + __func__, status); return; default: - dbg("%s - nonzero urb status received: %d", __func__, status); + dev_dbg(dev, "%s - nonzero urb status received: %d\n", + __func__, status); goto exit; } exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - err("%s - usb_submit_urb failed with result %d", - __func__, retval); + dev_err(dev, "%s - usb_submit_urb failed with result %d\n", + __func__, retval); } static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad) @@ -658,7 +669,8 @@ static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect return usb_submit_urb(xpad->irq_out, GFP_ATOMIC); default: - dbg("%s - rumble command sent to unsupported xpad type: %d", + dev_dbg(&xpad->dev->dev, + "%s - rumble command sent to unsupported xpad type: %d\n", __func__, xpad->xtype); return -1; } @@ -848,6 +860,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id } xpad->udev = udev; + xpad->intf = intf; xpad->mapping = xpad_device[i].mapping; xpad->xtype = xpad_device[i].xtype; |