aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/visor.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/usb/serial/visor.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'drivers/usb/serial/visor.c')
-rw-r--r--drivers/usb/serial/visor.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index eb76aaef4268..1c11959a7d58 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -27,6 +27,7 @@
27#include <linux/uaccess.h> 27#include <linux/uaccess.h>
28#include <linux/usb.h> 28#include <linux/usb.h>
29#include <linux/usb/serial.h> 29#include <linux/usb/serial.h>
30#include <linux/usb/cdc.h>
30#include "visor.h" 31#include "visor.h"
31 32
32/* 33/*
@@ -479,6 +480,17 @@ static int visor_probe(struct usb_serial *serial,
479 480
480 dbg("%s", __func__); 481 dbg("%s", __func__);
481 482
483 /*
484 * some Samsung Android phones in modem mode have the same ID
485 * as SPH-I500, but they are ACM devices, so dont bind to them
486 */
487 if (id->idVendor == SAMSUNG_VENDOR_ID &&
488 id->idProduct == SAMSUNG_SPH_I500_ID &&
489 serial->dev->descriptor.bDeviceClass == USB_CLASS_COMM &&
490 serial->dev->descriptor.bDeviceSubClass ==
491 USB_CDC_SUBCLASS_ACM)
492 return -ENODEV;
493
482 if (serial->dev->actconfig->desc.bConfigurationValue != 1) { 494 if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
483 dev_err(&serial->dev->dev, "active config #%d != 1 ??\n", 495 dev_err(&serial->dev->dev, "active config #%d != 1 ??\n",
484 serial->dev->actconfig->desc.bConfigurationValue); 496 serial->dev->actconfig->desc.bConfigurationValue);
@@ -606,6 +618,10 @@ static int treo_attach(struct usb_serial *serial)
606 618
607static int clie_5_attach(struct usb_serial *serial) 619static int clie_5_attach(struct usb_serial *serial)
608{ 620{
621 struct usb_serial_port *port;
622 unsigned int pipe;
623 int j;
624
609 dbg("%s", __func__); 625 dbg("%s", __func__);
610 626
611 /* TH55 registers 2 ports. 627 /* TH55 registers 2 ports.
@@ -621,9 +637,14 @@ static int clie_5_attach(struct usb_serial *serial)
621 return -1; 637 return -1;
622 638
623 /* port 0 now uses the modified endpoint Address */ 639 /* port 0 now uses the modified endpoint Address */
624 serial->port[0]->bulk_out_endpointAddress = 640 port = serial->port[0];
641 port->bulk_out_endpointAddress =
625 serial->port[1]->bulk_out_endpointAddress; 642 serial->port[1]->bulk_out_endpointAddress;
626 643
644 pipe = usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress);
645 for (j = 0; j < ARRAY_SIZE(port->write_urbs); ++j)
646 port->write_urbs[j]->pipe = pipe;
647
627 return 0; 648 return 0;
628} 649}
629 650