diff options
author | Kevin Lloyd <klloyd@sierrawireless.com> | 2008-03-28 13:05:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:44 -0400 |
commit | f3564de4f5ee3e205227691401d875a57b76906d (patch) | |
tree | d8e60cf9759df66e35b27371b6b202ceea6e445a /drivers | |
parent | e4cf3aa8f9cd6ee4d583b5d445b5c152acefcde4 (diff) |
USB: Serial: Sierra: Clean up
This patch cleans up some of the sierra driver code. Please package this
with the other patches in this group as I would like the driver version
to reflect their changes as well.
Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/sierra.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 7b02a4ae1da4..5e55959daaaf 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | USB Driver for Sierra Wireless | 2 | USB Driver for Sierra Wireless |
3 | 3 | ||
4 | Copyright (C) 2006, 2007, 2008 Kevin Lloyd <linux@sierrawireless.com> | 4 | Copyright (C) 2006, 2007, 2008 Kevin Lloyd <klloyd@sierrawireless.com> |
5 | 5 | ||
6 | IMPORTANT DISCLAIMER: This driver is not commercially supported by | 6 | IMPORTANT DISCLAIMER: This driver is not commercially supported by |
7 | Sierra Wireless. Use at your own risk. | 7 | Sierra Wireless. Use at your own risk. |
@@ -14,8 +14,8 @@ | |||
14 | Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org> | 14 | Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org> |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #define DRIVER_VERSION "v.1.2.8" | 17 | #define DRIVER_VERSION "v.1.2.9c" |
18 | #define DRIVER_AUTHOR "Kevin Lloyd <linux@sierrawireless.com>" | 18 | #define DRIVER_AUTHOR "Kevin Lloyd <klloyd@sierrawireless.com>" |
19 | #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" | 19 | #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
@@ -31,7 +31,6 @@ | |||
31 | #define SWIMS_USB_REQUEST_SetPower 0x00 | 31 | #define SWIMS_USB_REQUEST_SetPower 0x00 |
32 | #define SWIMS_USB_REQUEST_SetNmea 0x07 | 32 | #define SWIMS_USB_REQUEST_SetNmea 0x07 |
33 | #define SWIMS_USB_REQUEST_SetMode 0x0B | 33 | #define SWIMS_USB_REQUEST_SetMode 0x0B |
34 | #define SWIMS_USB_REQUEST_TYPE_VSC_SET 0x40 | ||
35 | #define SWIMS_SET_MODE_Modem 0x0001 | 34 | #define SWIMS_SET_MODE_Modem 0x0001 |
36 | 35 | ||
37 | /* per port private data */ | 36 | /* per port private data */ |
@@ -55,7 +54,7 @@ static int sierra_set_power_state(struct usb_device *udev, __u16 swiState) | |||
55 | dev_dbg(&udev->dev, "%s", "SET POWER STATE\n"); | 54 | dev_dbg(&udev->dev, "%s", "SET POWER STATE\n"); |
56 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 55 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
57 | SWIMS_USB_REQUEST_SetPower, /* __u8 request */ | 56 | SWIMS_USB_REQUEST_SetPower, /* __u8 request */ |
58 | SWIMS_USB_REQUEST_TYPE_VSC_SET, /* __u8 request type */ | 57 | USB_TYPE_VENDOR, /* __u8 request type */ |
59 | swiState, /* __u16 value */ | 58 | swiState, /* __u16 value */ |
60 | 0, /* __u16 index */ | 59 | 0, /* __u16 index */ |
61 | NULL, /* void *data */ | 60 | NULL, /* void *data */ |
@@ -70,7 +69,7 @@ static int sierra_set_ms_mode(struct usb_device *udev, __u16 eSWocMode) | |||
70 | dev_dbg(&udev->dev, "%s", "DEVICE MODE SWITCH\n"); | 69 | dev_dbg(&udev->dev, "%s", "DEVICE MODE SWITCH\n"); |
71 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 70 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
72 | SWIMS_USB_REQUEST_SetMode, /* __u8 request */ | 71 | SWIMS_USB_REQUEST_SetMode, /* __u8 request */ |
73 | SWIMS_USB_REQUEST_TYPE_VSC_SET, /* __u8 request type */ | 72 | USB_TYPE_VENDOR, /* __u8 request type */ |
74 | eSWocMode, /* __u16 value */ | 73 | eSWocMode, /* __u16 value */ |
75 | 0x0000, /* __u16 index */ | 74 | 0x0000, /* __u16 index */ |
76 | NULL, /* void *data */ | 75 | NULL, /* void *data */ |
@@ -85,7 +84,7 @@ static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable) | |||
85 | dev_dbg(&udev->dev, "%s", "NMEA Enable sent\n"); | 84 | dev_dbg(&udev->dev, "%s", "NMEA Enable sent\n"); |
86 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 85 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
87 | SWIMS_USB_REQUEST_SetNmea, /* __u8 request */ | 86 | SWIMS_USB_REQUEST_SetNmea, /* __u8 request */ |
88 | SWIMS_USB_REQUEST_TYPE_VSC_SET, /* __u8 request type */ | 87 | USB_TYPE_VENDOR, /* __u8 request type */ |
89 | enable, /* __u16 value */ | 88 | enable, /* __u16 value */ |
90 | 0x0000, /* __u16 index */ | 89 | 0x0000, /* __u16 index */ |
91 | NULL, /* void *data */ | 90 | NULL, /* void *data */ |
@@ -453,7 +452,7 @@ static void sierra_instat_callback(struct urb *urb) | |||
453 | struct usb_serial *serial = port->serial; | 452 | struct usb_serial *serial = port->serial; |
454 | 453 | ||
455 | dbg("%s", __FUNCTION__); | 454 | dbg("%s", __FUNCTION__); |
456 | dbg("%s: urb %p port %p has data %p", __FUNCTION__,urb,port,portdata); | 455 | dbg("%s: urb %p port %p has data %p", __FUNCTION__, urb, port, portdata); |
457 | 456 | ||
458 | if (status == 0) { | 457 | if (status == 0) { |
459 | struct usb_ctrlrequest *req_pkt = | 458 | struct usb_ctrlrequest *req_pkt = |
@@ -483,7 +482,7 @@ static void sierra_instat_callback(struct urb *urb) | |||
483 | tty_hangup(port->tty); | 482 | tty_hangup(port->tty); |
484 | } else { | 483 | } else { |
485 | dbg("%s: type %x req %x", __FUNCTION__, | 484 | dbg("%s: type %x req %x", __FUNCTION__, |
486 | req_pkt->bRequestType,req_pkt->bRequest); | 485 | req_pkt->bRequestType, req_pkt->bRequest); |
487 | } | 486 | } |
488 | } else | 487 | } else |
489 | dbg("%s: error %d", __FUNCTION__, status); | 488 | dbg("%s: error %d", __FUNCTION__, status); |