Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: drivers/usb/serial/qcserial.c

Issue 6652004: CHROMIUM: qcserial: Add support for Gobi 3000 devices. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/kernel.git@master
Patch Set: Consolidate 2k/3k probe logic. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Qualcomm Serial USB driver 2 * Qualcomm Serial USB driver
3 * 3 *
4 * Copyright (c) 2008 QUALCOMM Incorporated. 4 * Copyright (c) 2008 QUALCOMM Incorporated.
5 * Copyright (c) 2009 Greg Kroah-Hartman <gregkh@suse.de> 5 * Copyright (c) 2009 Greg Kroah-Hartman <gregkh@suse.de>
6 * Copyright (c) 2009 Novell Inc. 6 * Copyright (c) 2009 Novell Inc.
7 * 7 *
8 * This program is free software; you can redistribute it and/or 8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License version 9 * modify it under the terms of the GNU General Public License version
10 * 2 as published by the Free Software Foundation. 10 * 2 as published by the Free Software Foundation.
11 * 11 *
12 */ 12 */
13 13
14 #include <linux/tty.h> 14 #include <linux/tty.h>
15 #include <linux/tty_flip.h> 15 #include <linux/tty_flip.h>
16 #include <linux/usb.h> 16 #include <linux/usb.h>
17 #include <linux/usb/serial.h> 17 #include <linux/usb/serial.h>
18 #include <linux/slab.h> 18 #include <linux/slab.h>
19 #include "usb-wwan.h" 19 #include "usb-wwan.h"
20 20
21 #define DRIVER_AUTHOR "Qualcomm Inc" 21 #define DRIVER_AUTHOR "Qualcomm Inc"
22 #define DRIVER_DESC "Qualcomm USB Serial driver" 22 #define DRIVER_DESC "Qualcomm USB Serial driver"
23 23
24 static int debug; 24 static int debug;
25 static bool export_non_qmi = true; 25 static bool export_non_qmi = true;
26 26
27 #define USB_DEVICE_DRVINFO(vid,pid,data) \
28 USB_DEVICE(vid,pid), .driver_info = data
29
30 enum {
31 GOBI2K = 0,
32 GOBI3K = 1,
33 };
34
27 static const struct usb_device_id id_table[] = { 35 static const struct usb_device_id id_table[] = {
28 {USB_DEVICE(0x05c6, 0x9211)}, /* Acer Gobi QDL device */ 36 {USB_DEVICE_DRVINFO(0x05c6, 0x9211, GOBI2K)}, /* Acer Gobi QDL device */
29 {USB_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ 37 {USB_DEVICE_DRVINFO(0x05c6, 0x9212, GOBI2K)}, /* Acer Gobi Modem Devic e */
30 {USB_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */ 38 {USB_DEVICE_DRVINFO(0x03f0, 0x1f1d, GOBI2K)}, /* HP un2400 Gobi Modem Device */
31 {USB_DEVICE(0x03f0, 0x201d)}, /* HP un2400 Gobi QDL Device */ 39 {USB_DEVICE_DRVINFO(0x03f0, 0x201d, GOBI2K)}, /* HP un2400 Gobi QDL De vice */
32 {USB_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */ 40 {USB_DEVICE_DRVINFO(0x04da, 0x250d, GOBI2K)}, /* Panasonic Gobi Modem device */
33 {USB_DEVICE(0x04da, 0x250c)}, /* Panasonic Gobi QDL device */ 41 {USB_DEVICE_DRVINFO(0x04da, 0x250c, GOBI2K)}, /* Panasonic Gobi QDL de vice */
34 {USB_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */ 42 {USB_DEVICE_DRVINFO(0x413c, 0x8172, GOBI2K)}, /* Dell Gobi Modem devic e */
35 {USB_DEVICE(0x413c, 0x8171)}, /* Dell Gobi QDL device */ 43 {USB_DEVICE_DRVINFO(0x413c, 0x8171, GOBI2K)}, /* Dell Gobi QDL device */
36 {USB_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */ 44 {USB_DEVICE_DRVINFO(0x1410, 0xa001, GOBI2K)}, /* Novatel Gobi Modem de vice */
37 {USB_DEVICE(0x1410, 0xa008)}, /* Novatel Gobi QDL device */ 45 {USB_DEVICE_DRVINFO(0x1410, 0xa008, GOBI2K)}, /* Novatel Gobi QDL devi ce */
38 {USB_DEVICE(0x1410, 0xa010)}, /* Novatel Gobi QDL device */ 46 {USB_DEVICE_DRVINFO(0x1410, 0xa010, GOBI2K)}, /* Novatel Gobi QDL devi ce */
39 {USB_DEVICE(0x1410, 0xa011)}, /* Novatel Gobi QDL device */ 47 {USB_DEVICE_DRVINFO(0x1410, 0xa011, GOBI2K)}, /* Novatel Gobi QDL devi ce */
40 {USB_DEVICE(0x1410, 0xa012)}, /* Novatel Gobi QDL device */ 48 {USB_DEVICE_DRVINFO(0x1410, 0xa012, GOBI2K)}, /* Novatel Gobi QDL devi ce */
41 {USB_DEVICE(0x1410, 0xa013)}, /* Novatel Gobi QDL device */ 49 {USB_DEVICE_DRVINFO(0x1410, 0xa013, GOBI2K)}, /* Novatel Gobi QDL devi ce */
42 {USB_DEVICE(0x1410, 0xa014)}, /* Novatel Gobi QDL device */ 50 {USB_DEVICE_DRVINFO(0x1410, 0xa014, GOBI2K)}, /* Novatel Gobi QDL devi ce */
43 {USB_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */ 51 {USB_DEVICE_DRVINFO(0x0b05, 0x1776, GOBI2K)}, /* Asus Gobi Modem devic e */
44 {USB_DEVICE(0x0b05, 0x1774)}, /* Asus Gobi QDL device */ 52 {USB_DEVICE_DRVINFO(0x0b05, 0x1774, GOBI2K)}, /* Asus Gobi QDL device */
45 {USB_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */ 53 {USB_DEVICE_DRVINFO(0x19d2, 0xfff3, GOBI2K)}, /* ONDA Gobi Modem devic e */
46 {USB_DEVICE(0x19d2, 0xfff2)}, /* ONDA Gobi QDL device */ 54 {USB_DEVICE_DRVINFO(0x19d2, 0xfff2, GOBI2K)}, /* ONDA Gobi QDL device */
47 {USB_DEVICE(0x1557, 0x0a80)}, /* OQO Gobi QDL device */ 55 {USB_DEVICE_DRVINFO(0x1557, 0x0a80, GOBI2K)}, /* OQO Gobi QDL device * /
48 {USB_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */ 56 {USB_DEVICE_DRVINFO(0x05c6, 0x9001, GOBI2K)}, /* Generic Gobi Modem de vice */
49 {USB_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */ 57 {USB_DEVICE_DRVINFO(0x05c6, 0x9002, GOBI2K)}, /* Generic Gobi Modem de vice */
50 {USB_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */ 58 {USB_DEVICE_DRVINFO(0x05c6, 0x9202, GOBI2K)}, /* Generic Gobi Modem de vice */
51 {USB_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */ 59 {USB_DEVICE_DRVINFO(0x05c6, 0x9203, GOBI2K)}, /* Generic Gobi Modem de vice */
52 {USB_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */ 60 {USB_DEVICE_DRVINFO(0x05c6, 0x9222, GOBI2K)}, /* Generic Gobi Modem de vice */
53 {USB_DEVICE(0x05c6, 0x9008)}, /* Generic Gobi QDL device */ 61 {USB_DEVICE_DRVINFO(0x05c6, 0x9008, GOBI2K)}, /* Generic Gobi QDL devi ce */
54 {USB_DEVICE(0x05c6, 0x9201)}, /* Generic Gobi QDL device */ 62 {USB_DEVICE_DRVINFO(0x05c6, 0x9201, GOBI2K)}, /* Generic Gobi QDL devi ce */
55 {USB_DEVICE(0x05c6, 0x9221)}, /* Generic Gobi QDL device */ 63 {USB_DEVICE_DRVINFO(0x05c6, 0x9221, GOBI2K)}, /* Generic Gobi QDL devi ce */
56 {USB_DEVICE(0x05c6, 0x9231)}, /* Generic Gobi QDL device */ 64 {USB_DEVICE_DRVINFO(0x05c6, 0x9231, GOBI2K)}, /* Generic Gobi QDL devi ce */
57 {USB_DEVICE(0x1f45, 0x0001)}, /* Unknown Gobi QDL device */ 65 {USB_DEVICE_DRVINFO(0x1f45, 0x0001, GOBI2K)}, /* Unknown Gobi QDL devi ce */
58 {USB_DEVICE(0x413c, 0x8185)}, /* Dell Gobi 2000 QDL device (N0218, VU9 36) */ 66 {USB_DEVICE_DRVINFO(0x413c, 0x8185, GOBI2K)}, /* Dell Gobi 2000 QDL de vice (N0218, VU936) */
59 {USB_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, V U936) */ 67 {USB_DEVICE_DRVINFO(0x413c, 0x8186, GOBI2K)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */
60 {USB_DEVICE(0x05c6, 0x9224)}, /* Sony Gobi 2000 QDL device (N0279, VU7 30) */ 68 {USB_DEVICE_DRVINFO(0x05c6, 0x9224, GOBI2K)}, /* Sony Gobi 2000 QDL de vice (N0279, VU730) */
61 {USB_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, V U730) */ 69 {USB_DEVICE_DRVINFO(0x05c6, 0x9225, GOBI2K)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */
62 {USB_DEVICE(0x05c6, 0x9244)}, /* Samsung Gobi 2000 QDL device (VL176) */ 70 {USB_DEVICE_DRVINFO(0x05c6, 0x9244, GOBI2K)}, /* Samsung Gobi 2000 QDL device (VL176) */
63 {USB_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem device (VL176 ) */ 71 {USB_DEVICE_DRVINFO(0x05c6, 0x9245, GOBI2K)}, /* Samsung Gobi 2000 Mod em device (VL176) */
64 {USB_DEVICE(0x03f0, 0x241d)}, /* HP Gobi 2000 QDL device (VP412) */ 72 {USB_DEVICE_DRVINFO(0x03f0, 0x241d, GOBI2K)}, /* HP Gobi 2000 QDL devi ce (VP412) */
65 {USB_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */ 73 {USB_DEVICE_DRVINFO(0x03f0, 0x251d, GOBI2K)}, /* HP Gobi 2000 Modem de vice (VP412) */
66 {USB_DEVICE(0x05c6, 0x9214)}, /* Acer Gobi 2000 QDL device (VP413) */ 74 {USB_DEVICE_DRVINFO(0x05c6, 0x9214, GOBI2K)}, /* Acer Gobi 2000 QDL de vice (VP413) */
67 {USB_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) * / 75 {USB_DEVICE_DRVINFO(0x05c6, 0x9215, GOBI2K)}, /* Acer Gobi 2000 Modem device (VP413) */
68 {USB_DEVICE(0x05c6, 0x9264)}, /* Asus Gobi 2000 QDL device (VR305) */ 76 {USB_DEVICE_DRVINFO(0x05c6, 0x9264, GOBI2K)}, /* Asus Gobi 2000 QDL de vice (VR305) */
69 {USB_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) * / 77 {USB_DEVICE_DRVINFO(0x05c6, 0x9265, GOBI2K)}, /* Asus Gobi 2000 Modem device (VR305) */
70 {USB_DEVICE(0x05c6, 0x9234)}, /* Top Global Gobi 2000 QDL device (VR30 6) */ 78 {USB_DEVICE_DRVINFO(0x05c6, 0x9234, GOBI2K)}, /* Top Global Gobi 2000 QDL device (VR306) */
71 {USB_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR 306) */ 79 {USB_DEVICE_DRVINFO(0x05c6, 0x9235, GOBI2K)}, /* Top Global Gobi 2000 Modem device (VR306) */
72 {USB_DEVICE(0x05c6, 0x9274)}, /* iRex Technologies Gobi 2000 QDL devic e (VR307) */ 80 {USB_DEVICE_DRVINFO(0x05c6, 0x9274, GOBI2K)}, /* iRex Technologies Gob i 2000 QDL device (VR307) */
73 {USB_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi 2000 Modem dev ice (VR307) */ 81 {USB_DEVICE_DRVINFO(0x05c6, 0x9275, GOBI2K)}, /* iRex Technologies Gob i 2000 Modem device (VR307) */
74 {USB_DEVICE(0x1199, 0x9000)}, /* Sierra Wireless Gobi 2000 QDL device (VT773) */ 82 {USB_DEVICE_DRVINFO(0x1199, 0x9000, GOBI2K)}, /* Sierra Wireless Gobi 2000 QDL device (VT773) */
75 {USB_DEVICE(0x1199, 0x9001)}, /* Sierra Wireless Gobi 2000 Modem devic e (VT773) */ 83 {USB_DEVICE_DRVINFO(0x1199, 0x9001, GOBI2K)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
76 {USB_DEVICE(0x1199, 0x9002)}, /* Sierra Wireless Gobi 2000 Modem devic e (VT773) */ 84 {USB_DEVICE_DRVINFO(0x1199, 0x9002, GOBI2K)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
77 {USB_DEVICE(0x1199, 0x9003)}, /* Sierra Wireless Gobi 2000 Modem devic e (VT773) */ 85 {USB_DEVICE_DRVINFO(0x1199, 0x9003, GOBI2K)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
78 {USB_DEVICE(0x1199, 0x9004)}, /* Sierra Wireless Gobi 2000 Modem devic e (VT773) */ 86 {USB_DEVICE_DRVINFO(0x1199, 0x9004, GOBI2K)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
79 {USB_DEVICE(0x1199, 0x9005)}, /* Sierra Wireless Gobi 2000 Modem devic e (VT773) */ 87 {USB_DEVICE_DRVINFO(0x1199, 0x9005, GOBI2K)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
80 {USB_DEVICE(0x1199, 0x9006)}, /* Sierra Wireless Gobi 2000 Modem devic e (VT773) */ 88 {USB_DEVICE_DRVINFO(0x1199, 0x9006, GOBI2K)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
81 {USB_DEVICE(0x1199, 0x9007)}, /* Sierra Wireless Gobi 2000 Modem devic e (VT773) */ 89 {USB_DEVICE_DRVINFO(0x1199, 0x9007, GOBI2K)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
82 {USB_DEVICE(0x1199, 0x9008)}, /* Sierra Wireless Gobi 2000 Modem devic e (VT773) */ 90 {USB_DEVICE_DRVINFO(0x1199, 0x9008, GOBI2K)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
83 {USB_DEVICE(0x1199, 0x9009)}, /* Sierra Wireless Gobi 2000 Modem devic e (VT773) */ 91 {USB_DEVICE_DRVINFO(0x1199, 0x9009, GOBI2K)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
84 {USB_DEVICE(0x1199, 0x900a)}, /* Sierra Wireless Gobi 2000 Modem devic e (VT773) */ 92 {USB_DEVICE_DRVINFO(0x1199, 0x900a, GOBI2K)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
85 {USB_DEVICE(0x16d8, 0x8001)}, /* CMDTech Gobi 2000 QDL device (VU922) */ 93 {USB_DEVICE_DRVINFO(0x16d8, 0x8001, GOBI2K)}, /* CMDTech Gobi 2000 QDL device (VU922) */
86 {USB_DEVICE(0x16d8, 0x8002)}, /* CMDTech Gobi 2000 Modem device (VU922 ) */ 94 {USB_DEVICE_DRVINFO(0x16d8, 0x8002, GOBI2K)}, /* CMDTech Gobi 2000 Mod em device (VU922) */
87 {USB_DEVICE(0x05c6, 0x9204)}, /* Gobi 2000 QDL device */ 95 {USB_DEVICE_DRVINFO(0x05c6, 0x9204, GOBI2K)}, /* Gobi 2000 QDL device */
88 {USB_DEVICE(0x05c6, 0x9205)}, /* Gobi 2000 Modem device */ 96 {USB_DEVICE_DRVINFO(0x05c6, 0x9205, GOBI2K)}, /* Gobi 2000 Modem devic e */
89 {USB_DEVICE(0x05c6, 0x9208)}, /* Gobi 2000 QDL device */ 97 {USB_DEVICE_DRVINFO(0x05c6, 0x9208, GOBI2K)}, /* Gobi 2000 QDL device */
90 {USB_DEVICE(0x05c6, 0x920B)}, /* Gobi 2000 Modem device */ 98 {USB_DEVICE_DRVINFO(0x05c6, 0x920B, GOBI2K)}, /* Gobi 2000 Modem devic e */
99
100 {USB_DEVICE_DRVINFO(0x05c6, 0x920c, GOBI3K)}, /* Gobi 3000 QDL */
101 {USB_DEVICE_DRVINFO(0x05c6, 0x920d, GOBI3K)}, /* Gobi 3000 Composite * /
102 /* TODO(ellyjones): Novatel Gobi 3000 QDL? */
103 {USB_DEVICE_DRVINFO(0x1410, 0xa021, GOBI3K)}, /* Novatel Gobi 3000 Com posite */
91 { } /* Terminating entry */ 104 { } /* Terminating entry */
92 }; 105 };
93 MODULE_DEVICE_TABLE(usb, id_table); 106 MODULE_DEVICE_TABLE(usb, id_table);
94 107
95 static struct usb_driver qcdriver = { 108 static struct usb_driver qcdriver = {
96 .name = "qcserial", 109 .name = "qcserial",
97 .probe = usb_serial_probe, 110 .probe = usb_serial_probe,
98 .disconnect = usb_serial_disconnect, 111 .disconnect = usb_serial_disconnect,
99 .id_table = id_table, 112 .id_table = id_table,
100 .suspend = usb_serial_suspend, 113 .suspend = usb_serial_suspend,
(...skipping 16 matching lines...) Expand all
117 ifnum = intf->desc.bInterfaceNumber; 130 ifnum = intf->desc.bInterfaceNumber;
118 dbg("This Interface = %d", ifnum); 131 dbg("This Interface = %d", ifnum);
119 132
120 data = serial->private = kzalloc(sizeof(struct usb_wwan_intf_private), 133 data = serial->private = kzalloc(sizeof(struct usb_wwan_intf_private),
121 GFP_KERNEL); 134 GFP_KERNEL);
122 if (!data) 135 if (!data)
123 return -ENOMEM; 136 return -ENOMEM;
124 137
125 spin_lock_init(&data->susp_lock); 138 spin_lock_init(&data->susp_lock);
126 139
127 » switch (nintf) { 140 » if (nintf == 1) {
128 » case 1:
129 /* QDL mode */ 141 /* QDL mode */
130 /* Gobi 2000 has a single altsetting, older ones have two */ 142 /* Gobi 2000 has a single altsetting, older ones have two */
131 if (serial->interface->num_altsetting == 2) 143 if (serial->interface->num_altsetting == 2)
132 intf = &serial->interface->altsetting[1]; 144 intf = &serial->interface->altsetting[1];
133 » » else if (serial->interface->num_altsetting > 2) 145 » » else if (serial->interface->num_altsetting > 2) {
134 » » » break; 146 » » » printk(KERN_INFO "too many altsettings: %u", serial->int erface->num_altsetting);
147 » » » return -ENODEV;
148 » » }
135 149
136 if (intf->desc.bNumEndpoints == 2 && 150 if (intf->desc.bNumEndpoints == 2 &&
137 usb_endpoint_is_bulk_in(&intf->endpoint[0].desc) && 151 usb_endpoint_is_bulk_in(&intf->endpoint[0].desc) &&
138 usb_endpoint_is_bulk_out(&intf->endpoint[1].desc)) { 152 usb_endpoint_is_bulk_out(&intf->endpoint[1].desc)) {
139 dbg("QDL port found"); 153 dbg("QDL port found");
140 154
141 if (serial->interface->num_altsetting == 1) 155 if (serial->interface->num_altsetting == 1)
142 return 0; 156 return 0;
143 157
144 retval = usb_set_interface(serial->dev, ifnum, 1); 158 retval = usb_set_interface(serial->dev, ifnum, 1);
145 if (retval < 0) { 159 if (retval < 0) {
146 dev_err(&serial->dev->dev, 160 dev_err(&serial->dev->dev,
147 "Could not set interface, error %d\n", 161 "Could not set interface, error %d\n",
148 retval); 162 retval);
149 retval = -ENODEV; 163 retval = -ENODEV;
150 kfree(data); 164 kfree(data);
151 } 165 }
152 return retval; 166 return retval;
153 } 167 }
154 » » break; 168 » } else {
Jason Glasgow 2011/03/10 21:11:36 I assume this change is because Gobi 3k has more t
155
156 » case 3:
157 » case 4:
158 /* Composite mode */ 169 /* Composite mode */
159 » » if (ifnum == 2 || (export_non_qmi && ifnum != 0)) { 170 » » if ( ifnum == 2
171 » » || (id->driver_info == GOBI3K && ifnum == 3)
172 » » || (export_non_qmi && ifnum != 0)) {
160 dbg("Exporting interface %d", ifnum); 173 dbg("Exporting interface %d", ifnum);
161 retval = usb_set_interface(serial->dev, ifnum, 0); 174 retval = usb_set_interface(serial->dev, ifnum, 0);
162 if (retval < 0) { 175 if (retval < 0) {
163 dev_err(&serial->dev->dev, 176 dev_err(&serial->dev->dev,
164 "Could not set interface, error %d\n", 177 "Could not set interface, error %d\n",
165 retval); 178 retval);
166 retval = -ENODEV; 179 retval = -ENODEV;
167 kfree(data); 180 kfree(data);
168 } 181 }
169 return retval; 182 return retval;
170 } 183 }
171 break;
172 default:
173 dev_err(&serial->dev->dev, 184 dev_err(&serial->dev->dev,
174 "unknown number of interfaces: %d\n", nintf); 185 "unknown number of interfaces: %d\n", nintf);
175 kfree(data); 186 kfree(data);
176 return -ENODEV; 187 return -ENODEV;
177 } 188 }
178 189
179 return retval; 190 return retval;
180 } 191 }
181 192
182 static struct usb_serial_driver qcdevice = { 193 static struct usb_serial_driver qcdevice = {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 module_exit(qcexit); 241 module_exit(qcexit);
231 242
232 MODULE_AUTHOR(DRIVER_AUTHOR); 243 MODULE_AUTHOR(DRIVER_AUTHOR);
233 MODULE_DESCRIPTION(DRIVER_DESC); 244 MODULE_DESCRIPTION(DRIVER_DESC);
234 MODULE_LICENSE("GPL v2"); 245 MODULE_LICENSE("GPL v2");
235 246
236 module_param(debug, bool, S_IRUGO | S_IWUSR); 247 module_param(debug, bool, S_IRUGO | S_IWUSR);
237 MODULE_PARM_DESC(debug, "Debug enabled or not"); 248 MODULE_PARM_DESC(debug, "Debug enabled or not");
238 module_param(export_non_qmi, bool, S_IRUGO | S_IWUSR); 249 module_param(export_non_qmi, bool, S_IRUGO | S_IWUSR);
239 MODULE_PARM_DESC(export_non_qmi, "Export all non-QMI interfaces"); 250 MODULE_PARM_DESC(export_non_qmi, "Export all non-QMI interfaces");
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698