Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303765
b: refs/heads/master
c: 2d744b0
h: refs/heads/master
i:
  303763: b0ad6c1
v: v3
  • Loading branch information
Greg Kroah-Hartman committed May 4, 2012
1 parent 16f152a commit ca7cb73
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73e66ceada0b51279ffd4a6f5bffe79d7168d4e8
refs/heads/master: 2d744b09199d2481c99563fdcf7f1c60f87fd965
27 changes: 15 additions & 12 deletions trunk/drivers/input/mouse/appletouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ enum atp_status_bits {
struct atp {
char phys[64];
struct usb_device *udev; /* usb device */
struct usb_interface *intf; /* usb interface */
struct urb *urb; /* usb request block */
u8 *data; /* transferred data */
struct input_dev *input; /* input dev */
Expand Down Expand Up @@ -263,7 +264,7 @@ static int atp_geyser_init(struct atp *dev)

data = kmalloc(8, GFP_KERNEL);
if (!data) {
dev_err(&dev->input->dev, "Out of memory\n");
dev_err(&dev->intf->dev, "Out of memory\n");
return -ENOMEM;
}

Expand All @@ -278,7 +279,7 @@ static int atp_geyser_init(struct atp *dev)
for (i = 0; i < 8; i++)
dprintk("appletouch[%d]: %d\n", i, data[i]);

dev_err(&dev->input->dev, "Failed to read mode from device.\n");
dev_err(&dev->intf->dev, "Failed to read mode from device.\n");
ret = -EIO;
goto out_free;
}
Expand All @@ -297,7 +298,7 @@ static int atp_geyser_init(struct atp *dev)
for (i = 0; i < 8; i++)
dprintk("appletouch[%d]: %d\n", i, data[i]);

dev_err(&dev->input->dev, "Failed to request geyser raw mode\n");
dev_err(&dev->intf->dev, "Failed to request geyser raw mode\n");
ret = -EIO;
goto out_free;
}
Expand All @@ -321,7 +322,7 @@ static void atp_reinit(struct work_struct *work)

retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
if (retval)
dev_err(&dev->input->dev,
dev_err(&dev->intf->dev,
"atp_reinit: usb_submit_urb failed with error %d\n",
retval);
}
Expand Down Expand Up @@ -402,14 +403,15 @@ static int atp_status_check(struct urb *urb)
{
struct atp *dev = urb->context;
struct input_dev *idev = dev->input;
struct usb_interface *intf = dev->intf;

switch (urb->status) {
case 0:
/* success */
break;
case -EOVERFLOW:
if (!dev->overflow_warned) {
dev_warn(&idev->dev,
dev_warn(&intf->dev,
"appletouch: OVERFLOW with data length %d, actual length is %d\n",
dev->info->datalen, dev->urb->actual_length);
dev->overflow_warned = true;
Expand All @@ -418,13 +420,13 @@ static int atp_status_check(struct urb *urb)
case -ENOENT:
case -ESHUTDOWN:
/* This urb is terminated, clean up */
dev_dbg(&idev->dev,
dev_dbg(&intf->dev,
"atp_complete: urb shutting down with status: %d\n",
urb->status);
return ATP_URB_STATUS_ERROR_FATAL;

default:
dev_dbg(&idev->dev,
dev_dbg(&intf->dev,
"atp_complete: nonzero urb status received: %d\n",
urb->status);
return ATP_URB_STATUS_ERROR;
Expand All @@ -449,7 +451,7 @@ static void atp_detect_size(struct atp *dev)
for (i = dev->info->xsensors; i < ATP_XSENSORS; i++) {
if (dev->xy_cur[i]) {

dev_info(&dev->input->dev,
dev_info(&dev->intf->dev,
"appletouch: 17\" model detected.\n");

input_set_abs_params(dev->input, ABS_X, 0,
Expand Down Expand Up @@ -593,7 +595,7 @@ static void atp_complete_geyser_1_2(struct urb *urb)
exit:
retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
if (retval)
dev_err(&dev->input->dev,
dev_err(&dev->intf->dev,
"atp_complete: usb_submit_urb failed with result %d\n",
retval);
}
Expand Down Expand Up @@ -728,7 +730,7 @@ static void atp_complete_geyser_3_4(struct urb *urb)
exit:
retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
if (retval)
dev_err(&dev->input->dev,
dev_err(&dev->intf->dev,
"atp_complete: usb_submit_urb failed with result %d\n",
retval);
}
Expand Down Expand Up @@ -760,7 +762,7 @@ static int atp_handle_geyser(struct atp *dev)
if (atp_geyser_init(dev))
return -EIO;

dev_info(&dev->input->dev, "Geyser mode initialized.\n");
dev_info(&dev->intf->dev, "Geyser mode initialized.\n");
}

return 0;
Expand Down Expand Up @@ -803,6 +805,7 @@ static int atp_probe(struct usb_interface *iface,
}

dev->udev = udev;
dev->intf = iface;
dev->input = input_dev;
dev->info = info;
dev->overflow_warned = false;
Expand Down Expand Up @@ -891,7 +894,7 @@ static void atp_disconnect(struct usb_interface *iface)
usb_free_urb(dev->urb);
kfree(dev);
}
printk(KERN_INFO "input: appletouch disconnected\n");
dev_info(&iface->dev, "input: appletouch disconnected\n");
}

static int atp_recover(struct atp *dev)
Expand Down

0 comments on commit ca7cb73

Please sign in to comment.