From: Dmitry Torokhov Date: Tue, 17 Jun 2008 16:02:44 +0000 (-0400) Subject: Merge branch 'for-linus' into next X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=15439dd37f92f930ac7fc65a4f261834e4215bb0;p=linux-beck.git Merge branch 'for-linus' into next Conflicts: drivers/input/mouse/appletouch.c --- 15439dd37f92f930ac7fc65a4f261834e4215bb0 diff --cc drivers/input/mouse/appletouch.c index 6867c914b024,ce6fdec19e14..1f41ae94f26b --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c @@@ -564,8 -589,22 +564,23 @@@ static void atp_close(struct input_dev dev->open = 0; } + static int atp_handle_geyser(struct atp *dev) + { + struct usb_device *udev = dev->udev; + - if (!atp_is_fountain(dev)) { ++ if (dev->type != ATP_FOUNTAIN) { + /* switch to raw sensor mode */ + if (atp_geyser_init(udev)) + return -EIO; + + printk(KERN_INFO "appletouch: Geyser mode initialized.\n"); + } + + return 0; + } + -static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id) +static int atp_probe(struct usb_interface *iface, + const struct usb_device_id *id) { struct atp *dev; struct input_dev *input_dev; @@@ -601,21 -640,14 +616,13 @@@ dev->udev = udev; dev->input = input_dev; - dev->overflowwarn = 0; - if (atp_is_geyser_3(dev)) - dev->datalen = 64; - else if (atp_is_geyser_2(dev)) - dev->datalen = 64; - else + dev->type = id->driver_info; + dev->overflow_warned = false; + if (dev->type == ATP_FOUNTAIN || dev->type == ATP_GEYSER1) dev->datalen = 81; + else + dev->datalen = 64; - if (dev->type != ATP_FOUNTAIN) { - /* switch to raw sensor mode */ - if (atp_geyser_init(udev)) - goto err_free_devs; - - printk(KERN_INFO "appletouch: Geyser mode initialized.\n"); - } - dev->urb = usb_alloc_urb(0, GFP_KERNEL); if (!dev->urb) goto err_free_devs;