Commit 8dae693c authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

usb: ftdi-elan: Convert leading spaces to tabs

Use tabs for indentation.
Use a more normal kernel comment style (align multiline *'s)

git diff -w shows no differences
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 90ba4f79
/* /*
* USB FTDI client driver for Elan Digital Systems's Uxxx adapters * USB FTDI client driver for Elan Digital Systems's Uxxx adapters
* *
* Copyright(C) 2006 Elan Digital Systems Limited * Copyright(C) 2006 Elan Digital Systems Limited
* http://www.elandigitalsystems.com * http://www.elandigitalsystems.com
* *
* Author and Maintainer - Tony Olech - Elan Digital Systems * Author and Maintainer - Tony Olech - Elan Digital Systems
* tony.olech@elandigitalsystems.com * tony.olech@elandigitalsystems.com
* *
* This program is free software;you can redistribute it and/or * This program is free software;you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, version 2. * published by the Free Software Foundation, version 2.
* *
* *
* This driver was written by Tony Olech(tony.olech@elandigitalsystems.com) * This driver was written by Tony Olech(tony.olech@elandigitalsystems.com)
* based on various USB client drivers in the 2.6.15 linux kernel * based on various USB client drivers in the 2.6.15 linux kernel
* with constant reference to the 3rd Edition of Linux Device Drivers * with constant reference to the 3rd Edition of Linux Device Drivers
* published by O'Reilly * published by O'Reilly
* *
* The U132 adapter is a USB to CardBus adapter specifically designed * The U132 adapter is a USB to CardBus adapter specifically designed
* for PC cards that contain an OHCI host controller. Typical PC cards * for PC cards that contain an OHCI host controller. Typical PC cards
* are the Orange Mobile 3G Option GlobeTrotter Fusion card. * are the Orange Mobile 3G Option GlobeTrotter Fusion card.
* *
* The U132 adapter will *NOT *work with PC cards that do not contain * The U132 adapter will *NOT *work with PC cards that do not contain
* an OHCI controller. A simple way to test whether a PC card has an * an OHCI controller. A simple way to test whether a PC card has an
* OHCI controller as an interface is to insert the PC card directly * OHCI controller as an interface is to insert the PC card directly
* into a laptop(or desktop) with a CardBus slot and if "lspci" shows * into a laptop(or desktop) with a CardBus slot and if "lspci" shows
* a new USB controller and "lsusb -v" shows a new OHCI Host Controller * a new USB controller and "lsusb -v" shows a new OHCI Host Controller
* then there is a good chance that the U132 adapter will support the * then there is a good chance that the U132 adapter will support the
* PC card.(you also need the specific client driver for the PC card) * PC card.(you also need the specific client driver for the PC card)
* *
* Please inform the Author and Maintainer about any PC cards that * Please inform the Author and Maintainer about any PC cards that
* contain OHCI Host Controller and work when directly connected to * contain OHCI Host Controller and work when directly connected to
* an embedded CardBus slot but do not work when they are connected * an embedded CardBus slot but do not work when they are connected
* via an ELAN U132 adapter. * via an ELAN U132 adapter.
* *
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -62,20 +62,20 @@ static struct workqueue_struct *status_queue; ...@@ -62,20 +62,20 @@ static struct workqueue_struct *status_queue;
static struct workqueue_struct *command_queue; static struct workqueue_struct *command_queue;
static struct workqueue_struct *respond_queue; static struct workqueue_struct *respond_queue;
/* /*
* ftdi_module_lock exists to protect access to global variables * ftdi_module_lock exists to protect access to global variables
* *
*/ */
static struct mutex ftdi_module_lock; static struct mutex ftdi_module_lock;
static int ftdi_instances = 0; static int ftdi_instances = 0;
static struct list_head ftdi_static_list; static struct list_head ftdi_static_list;
/* /*
* end of the global variables protected by ftdi_module_lock * end of the global variables protected by ftdi_module_lock
*/ */
#include "usb_u132.h" #include "usb_u132.h"
#include <asm/io.h> #include <asm/io.h>
#include <linux/usb/hcd.h> #include <linux/usb/hcd.h>
/* FIXME ohci.h is ONLY for internal use by the OHCI driver. /* FIXME ohci.h is ONLY for internal use by the OHCI driver.
* If you're going to try stuff like this, you need to split * If you're going to try stuff like this, you need to split
* out shareable stuff (register declarations?) into its own * out shareable stuff (register declarations?) into its own
* file, maybe name <linux/usb/ohci.h> * file, maybe name <linux/usb/ohci.h>
...@@ -93,16 +93,16 @@ static const struct usb_device_id ftdi_elan_table[] = { ...@@ -93,16 +93,16 @@ static const struct usb_device_id ftdi_elan_table[] = {
MODULE_DEVICE_TABLE(usb, ftdi_elan_table); MODULE_DEVICE_TABLE(usb, ftdi_elan_table);
/* only the jtag(firmware upgrade device) interface requires /* only the jtag(firmware upgrade device) interface requires
* a device file and corresponding minor number, but the * a device file and corresponding minor number, but the
* interface is created unconditionally - I suppose it could * interface is created unconditionally - I suppose it could
* be configured or not according to a module parameter. * be configured or not according to a module parameter.
* But since we(now) require one interface per device, * But since we(now) require one interface per device,
* and since it unlikely that a normal installation would * and since it unlikely that a normal installation would
* require more than a couple of elan-ftdi devices, 8 seems * require more than a couple of elan-ftdi devices, 8 seems
* like a reasonable limit to have here, and if someone * like a reasonable limit to have here, and if someone
* really requires more than 8 devices, then they can frig the * really requires more than 8 devices, then they can frig the
* code and recompile * code and recompile
*/ */
#define USB_FTDI_ELAN_MINOR_BASE 192 #define USB_FTDI_ELAN_MINOR_BASE 192
#define COMMAND_BITS 5 #define COMMAND_BITS 5
#define COMMAND_SIZE (1<<COMMAND_BITS) #define COMMAND_SIZE (1<<COMMAND_BITS)
...@@ -139,7 +139,7 @@ struct u132_target { ...@@ -139,7 +139,7 @@ struct u132_target {
int non_null; int non_null;
int active; int active;
int abandoning; int abandoning;
void (*callback) (void *endp, struct urb *urb, u8 *buf, int len, void (*callback)(void *endp, struct urb *urb, u8 *buf, int len,
int toggle_bits, int error_count, int condition_code, int toggle_bits, int error_count, int condition_code,
int repeat_number, int halted, int skipped, int actual, int repeat_number, int halted, int skipped, int actual,
int non_null); int non_null);
...@@ -515,10 +515,10 @@ static void ftdi_elan_respond_work(struct work_struct *work) ...@@ -515,10 +515,10 @@ static void ftdi_elan_respond_work(struct work_struct *work)
/* /*
* the sw_lock is initially held and will be freed * the sw_lock is initially held and will be freed
* after the FTDI has been synchronized * after the FTDI has been synchronized
* *
*/ */
static void ftdi_elan_status_work(struct work_struct *work) static void ftdi_elan_status_work(struct work_struct *work)
{ {
struct usb_ftdi *ftdi = struct usb_ftdi *ftdi =
...@@ -614,11 +614,11 @@ static void ftdi_elan_status_work(struct work_struct *work) ...@@ -614,11 +614,11 @@ static void ftdi_elan_status_work(struct work_struct *work)
/* /*
* file_operations for the jtag interface * file_operations for the jtag interface
* *
* the usage count for the device is incremented on open() * the usage count for the device is incremented on open()
* and decremented on release() * and decremented on release()
*/ */
static int ftdi_elan_open(struct inode *inode, struct file *file) static int ftdi_elan_open(struct inode *inode, struct file *file)
{ {
int subminor; int subminor;
...@@ -658,10 +658,10 @@ static int ftdi_elan_release(struct inode *inode, struct file *file) ...@@ -658,10 +658,10 @@ static int ftdi_elan_release(struct inode *inode, struct file *file)
/* /*
* *
* blocking bulk reads are used to get data from the device * blocking bulk reads are used to get data from the device
* *
*/ */
static ssize_t ftdi_elan_read(struct file *file, char __user *buffer, static ssize_t ftdi_elan_read(struct file *file, char __user *buffer,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
...@@ -676,7 +676,7 @@ static ssize_t ftdi_elan_read(struct file *file, char __user *buffer, ...@@ -676,7 +676,7 @@ static ssize_t ftdi_elan_read(struct file *file, char __user *buffer,
return -ENODEV; return -ENODEV;
} }
data[0] = 0; data[0] = 0;
have:if (ftdi->bulk_in_left > 0) { have:if (ftdi->bulk_in_left > 0) {
if (count-- > 0) { if (count-- > 0) {
char *p = ++ftdi->bulk_in_last + ftdi->bulk_in_buffer; char *p = ++ftdi->bulk_in_last + ftdi->bulk_in_buffer;
ftdi->bulk_in_left -= 1; ftdi->bulk_in_left -= 1;
...@@ -694,7 +694,7 @@ static ssize_t ftdi_elan_read(struct file *file, char __user *buffer, ...@@ -694,7 +694,7 @@ static ssize_t ftdi_elan_read(struct file *file, char __user *buffer,
} else } else
return bytes_read; return bytes_read;
} }
more:if (count > 0) { more:if (count > 0) {
int packet_bytes = 0; int packet_bytes = 0;
int retval = usb_bulk_msg(ftdi->udev, int retval = usb_bulk_msg(ftdi->udev,
usb_rcvbulkpipe(ftdi->udev, ftdi->bulk_in_endpointAddr), usb_rcvbulkpipe(ftdi->udev, ftdi->bulk_in_endpointAddr),
...@@ -942,13 +942,13 @@ static char *have_ed_get_response(struct usb_ftdi *ftdi, ...@@ -942,13 +942,13 @@ static char *have_ed_get_response(struct usb_ftdi *ftdi,
/* /*
* The engine tries to empty the FTDI fifo * The engine tries to empty the FTDI fifo
* *
* all responses found in the fifo data are dispatched thus * all responses found in the fifo data are dispatched thus
* the response buffer can only ever hold a maximum sized * the response buffer can only ever hold a maximum sized
* response from the Uxxx. * response from the Uxxx.
* *
*/ */
static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi) static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi)
{ {
u8 *b = ftdi->response + ftdi->received; u8 *b = ftdi->response + ftdi->received;
...@@ -956,7 +956,7 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi) ...@@ -956,7 +956,7 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi)
int retry_on_empty = 1; int retry_on_empty = 1;
int retry_on_timeout = 3; int retry_on_timeout = 3;
int empty_packets = 0; int empty_packets = 0;
read:{ read:{
int packet_bytes = 0; int packet_bytes = 0;
int retval = usb_bulk_msg(ftdi->udev, int retval = usb_bulk_msg(ftdi->udev,
usb_rcvbulkpipe(ftdi->udev, ftdi->bulk_in_endpointAddr), usb_rcvbulkpipe(ftdi->udev, ftdi->bulk_in_endpointAddr),
...@@ -1036,10 +1036,10 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi) ...@@ -1036,10 +1036,10 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi)
return 0; return 0;
} }
} }
more:{ more:{
goto read; goto read;
} }
have:if (ftdi->bulk_in_left > 0) { have:if (ftdi->bulk_in_left > 0) {
u8 c = ftdi->bulk_in_buffer[++ftdi->bulk_in_last]; u8 c = ftdi->bulk_in_buffer[++ftdi->bulk_in_last];
bytes_read += 1; bytes_read += 1;
ftdi->bulk_in_left -= 1; ftdi->bulk_in_left -= 1;
...@@ -1142,9 +1142,9 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi) ...@@ -1142,9 +1142,9 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi)
/* /*
* create a urb, and a buffer for it, and copy the data to the urb * create a urb, and a buffer for it, and copy the data to the urb
* *
*/ */
static ssize_t ftdi_elan_write(struct file *file, static ssize_t ftdi_elan_write(struct file *file,
const char __user *user_buffer, size_t count, const char __user *user_buffer, size_t count,
loff_t *ppos) loff_t *ppos)
...@@ -1207,9 +1207,9 @@ static const struct file_operations ftdi_elan_fops = { ...@@ -1207,9 +1207,9 @@ static const struct file_operations ftdi_elan_fops = {
}; };
/* /*
* usb class driver info in order to get a minor number from the usb core, * usb class driver info in order to get a minor number from the usb core,
* and to have the device registered with the driver core * and to have the device registered with the driver core
*/ */
static struct usb_class_driver ftdi_elan_jtag_class = { static struct usb_class_driver ftdi_elan_jtag_class = {
.name = "ftdi-%d-jtag", .name = "ftdi-%d-jtag",
.fops = &ftdi_elan_fops, .fops = &ftdi_elan_fops,
...@@ -1217,10 +1217,10 @@ static struct usb_class_driver ftdi_elan_jtag_class = { ...@@ -1217,10 +1217,10 @@ static struct usb_class_driver ftdi_elan_jtag_class = {
}; };
/* /*
* the following definitions are for the * the following definitions are for the
* ELAN FPGA state machgine processor that * ELAN FPGA state machgine processor that
* lies on the other side of the FTDI chip * lies on the other side of the FTDI chip
*/ */
#define cPCIu132rd 0x0 #define cPCIu132rd 0x0
#define cPCIu132wr 0x1 #define cPCIu132wr 0x1
#define cPCIiord 0x2 #define cPCIiord 0x2
...@@ -1251,7 +1251,7 @@ static struct usb_class_driver ftdi_elan_jtag_class = { ...@@ -1251,7 +1251,7 @@ static struct usb_class_driver ftdi_elan_jtag_class = {
#define cCCnotaccessed 0xF #define cCCnotaccessed 0xF
static int ftdi_elan_write_reg(struct usb_ftdi *ftdi, u32 data) static int ftdi_elan_write_reg(struct usb_ftdi *ftdi, u32 data)
{ {
wait:if (ftdi->disconnected > 0) { wait:if (ftdi->disconnected > 0) {
return -ENODEV; return -ENODEV;
} else { } else {
int command_size; int command_size;
...@@ -1283,7 +1283,7 @@ static int ftdi_elan_write_config(struct usb_ftdi *ftdi, int config_offset, ...@@ -1283,7 +1283,7 @@ static int ftdi_elan_write_config(struct usb_ftdi *ftdi, int config_offset,
u8 width, u32 data) u8 width, u32 data)
{ {
u8 addressofs = config_offset / 4; u8 addressofs = config_offset / 4;
wait:if (ftdi->disconnected > 0) { wait:if (ftdi->disconnected > 0) {
return -ENODEV; return -ENODEV;
} else { } else {
int command_size; int command_size;
...@@ -1315,7 +1315,7 @@ static int ftdi_elan_write_pcimem(struct usb_ftdi *ftdi, int mem_offset, ...@@ -1315,7 +1315,7 @@ static int ftdi_elan_write_pcimem(struct usb_ftdi *ftdi, int mem_offset,
u8 width, u32 data) u8 width, u32 data)
{ {
u8 addressofs = mem_offset / 4; u8 addressofs = mem_offset / 4;
wait:if (ftdi->disconnected > 0) { wait:if (ftdi->disconnected > 0) {
return -ENODEV; return -ENODEV;
} else { } else {
int command_size; int command_size;
...@@ -1354,7 +1354,7 @@ int usb_ftdi_elan_write_pcimem(struct platform_device *pdev, int mem_offset, ...@@ -1354,7 +1354,7 @@ int usb_ftdi_elan_write_pcimem(struct platform_device *pdev, int mem_offset,
EXPORT_SYMBOL_GPL(usb_ftdi_elan_write_pcimem); EXPORT_SYMBOL_GPL(usb_ftdi_elan_write_pcimem);
static int ftdi_elan_read_reg(struct usb_ftdi *ftdi, u32 *data) static int ftdi_elan_read_reg(struct usb_ftdi *ftdi, u32 *data)
{ {
wait:if (ftdi->disconnected > 0) { wait:if (ftdi->disconnected > 0) {
return -ENODEV; return -ENODEV;
} else { } else {
int command_size; int command_size;
...@@ -1397,7 +1397,7 @@ static int ftdi_elan_read_config(struct usb_ftdi *ftdi, int config_offset, ...@@ -1397,7 +1397,7 @@ static int ftdi_elan_read_config(struct usb_ftdi *ftdi, int config_offset,
u8 width, u32 *data) u8 width, u32 *data)
{ {
u8 addressofs = config_offset / 4; u8 addressofs = config_offset / 4;
wait:if (ftdi->disconnected > 0) { wait:if (ftdi->disconnected > 0) {
return -ENODEV; return -ENODEV;
} else { } else {
int command_size; int command_size;
...@@ -1441,7 +1441,7 @@ static int ftdi_elan_read_pcimem(struct usb_ftdi *ftdi, int mem_offset, ...@@ -1441,7 +1441,7 @@ static int ftdi_elan_read_pcimem(struct usb_ftdi *ftdi, int mem_offset,
u8 width, u32 *data) u8 width, u32 *data)
{ {
u8 addressofs = mem_offset / 4; u8 addressofs = mem_offset / 4;
wait:if (ftdi->disconnected > 0) { wait:if (ftdi->disconnected > 0) {
return -ENODEV; return -ENODEV;
} else { } else {
int command_size; int command_size;
...@@ -1500,7 +1500,7 @@ static int ftdi_elan_edset_setup(struct usb_ftdi *ftdi, u8 ed_number, ...@@ -1500,7 +1500,7 @@ static int ftdi_elan_edset_setup(struct usb_ftdi *ftdi, u8 ed_number,
int halted, int skipped, int actual, int non_null)) int halted, int skipped, int actual, int non_null))
{ {
u8 ed = ed_number - 1; u8 ed = ed_number - 1;
wait:if (ftdi->disconnected > 0) { wait:if (ftdi->disconnected > 0) {
return -ENODEV; return -ENODEV;
} else if (ftdi->initialized == 0) { } else if (ftdi->initialized == 0) {
return -ENODEV; return -ENODEV;
...@@ -1557,7 +1557,7 @@ static int ftdi_elan_edset_input(struct usb_ftdi *ftdi, u8 ed_number, ...@@ -1557,7 +1557,7 @@ static int ftdi_elan_edset_input(struct usb_ftdi *ftdi, u8 ed_number,
int halted, int skipped, int actual, int non_null)) int halted, int skipped, int actual, int non_null))
{ {
u8 ed = ed_number - 1; u8 ed = ed_number - 1;
wait:if (ftdi->disconnected > 0) { wait:if (ftdi->disconnected > 0) {
return -ENODEV; return -ENODEV;
} else if (ftdi->initialized == 0) { } else if (ftdi->initialized == 0) {
return -ENODEV; return -ENODEV;
...@@ -1622,7 +1622,7 @@ static int ftdi_elan_edset_empty(struct usb_ftdi *ftdi, u8 ed_number, ...@@ -1622,7 +1622,7 @@ static int ftdi_elan_edset_empty(struct usb_ftdi *ftdi, u8 ed_number,
int halted, int skipped, int actual, int non_null)) int halted, int skipped, int actual, int non_null))
{ {
u8 ed = ed_number - 1; u8 ed = ed_number - 1;
wait:if (ftdi->disconnected > 0) { wait:if (ftdi->disconnected > 0) {
return -ENODEV; return -ENODEV;
} else if (ftdi->initialized == 0) { } else if (ftdi->initialized == 0) {
return -ENODEV; return -ENODEV;
...@@ -1679,7 +1679,7 @@ static int ftdi_elan_edset_output(struct usb_ftdi *ftdi, u8 ed_number, ...@@ -1679,7 +1679,7 @@ static int ftdi_elan_edset_output(struct usb_ftdi *ftdi, u8 ed_number,
int halted, int skipped, int actual, int non_null)) int halted, int skipped, int actual, int non_null))
{ {
u8 ed = ed_number - 1; u8 ed = ed_number - 1;
wait:if (ftdi->disconnected > 0) { wait:if (ftdi->disconnected > 0) {
return -ENODEV; return -ENODEV;
} else if (ftdi->initialized == 0) { } else if (ftdi->initialized == 0) {
return -ENODEV; return -ENODEV;
...@@ -1758,7 +1758,7 @@ static int ftdi_elan_edset_single(struct usb_ftdi *ftdi, u8 ed_number, ...@@ -1758,7 +1758,7 @@ static int ftdi_elan_edset_single(struct usb_ftdi *ftdi, u8 ed_number,
int halted, int skipped, int actual, int non_null)) int halted, int skipped, int actual, int non_null))
{ {
u8 ed = ed_number - 1; u8 ed = ed_number - 1;
wait:if (ftdi->disconnected > 0) { wait:if (ftdi->disconnected > 0) {
return -ENODEV; return -ENODEV;
} else if (ftdi->initialized == 0) { } else if (ftdi->initialized == 0) {
return -ENODEV; return -ENODEV;
...@@ -1876,7 +1876,7 @@ static int ftdi_elan_flush_input_fifo(struct usb_ftdi *ftdi) ...@@ -1876,7 +1876,7 @@ static int ftdi_elan_flush_input_fifo(struct usb_ftdi *ftdi)
int retry_on_empty = 10; int retry_on_empty = 10;
int retry_on_timeout = 5; int retry_on_timeout = 5;
int retry_on_status = 20; int retry_on_status = 20;
more:{ more:{
int packet_bytes = 0; int packet_bytes = 0;
int retval = usb_bulk_msg(ftdi->udev, int retval = usb_bulk_msg(ftdi->udev,
usb_rcvbulkpipe(ftdi->udev, ftdi->bulk_in_endpointAddr), usb_rcvbulkpipe(ftdi->udev, ftdi->bulk_in_endpointAddr),
...@@ -1950,9 +1950,9 @@ static int ftdi_elan_flush_input_fifo(struct usb_ftdi *ftdi) ...@@ -1950,9 +1950,9 @@ static int ftdi_elan_flush_input_fifo(struct usb_ftdi *ftdi)
/* /*
* send the long flush sequence * send the long flush sequence
* *
*/ */
static int ftdi_elan_synchronize_flush(struct usb_ftdi *ftdi) static int ftdi_elan_synchronize_flush(struct usb_ftdi *ftdi)
{ {
int retval; int retval;
...@@ -1993,9 +1993,9 @@ static int ftdi_elan_synchronize_flush(struct usb_ftdi *ftdi) ...@@ -1993,9 +1993,9 @@ static int ftdi_elan_synchronize_flush(struct usb_ftdi *ftdi)
/* /*
* send the reset sequence * send the reset sequence
* *
*/ */
static int ftdi_elan_synchronize_reset(struct usb_ftdi *ftdi) static int ftdi_elan_synchronize_reset(struct usb_ftdi *ftdi)
{ {
int retval; int retval;
...@@ -2172,7 +2172,7 @@ static int ftdi_elan_stuck_waiting(struct usb_ftdi *ftdi) ...@@ -2172,7 +2172,7 @@ static int ftdi_elan_stuck_waiting(struct usb_ftdi *ftdi)
int retry_on_empty = 10; int retry_on_empty = 10;
int retry_on_timeout = 5; int retry_on_timeout = 5;
int retry_on_status = 50; int retry_on_status = 50;
more:{ more:{
int packet_bytes = 0; int packet_bytes = 0;
int retval = usb_bulk_msg(ftdi->udev, int retval = usb_bulk_msg(ftdi->udev,
usb_rcvbulkpipe(ftdi->udev, ftdi->bulk_in_endpointAddr), usb_rcvbulkpipe(ftdi->udev, ftdi->bulk_in_endpointAddr),
...@@ -2366,13 +2366,13 @@ static int ftdi_elan_check_controller(struct usb_ftdi *ftdi, int quirk) ...@@ -2366,13 +2366,13 @@ static int ftdi_elan_check_controller(struct usb_ftdi *ftdi, int quirk)
retval = ftdi_read_pcimem(ftdi, control, &control); retval = ftdi_read_pcimem(ftdi, control, &control);
if (retval) if (retval)
return retval; return retval;
retry:retval = ftdi_read_pcimem(ftdi, cmdstatus, &status); retry:retval = ftdi_read_pcimem(ftdi, cmdstatus, &status);
if (retval) if (retval)
return retval; return retval;
retval = ftdi_write_pcimem(ftdi, cmdstatus, OHCI_HCR); retval = ftdi_write_pcimem(ftdi, cmdstatus, OHCI_HCR);
if (retval) if (retval)
return retval; return retval;
extra:{ extra:{
retval = ftdi_read_pcimem(ftdi, cmdstatus, &status); retval = ftdi_read_pcimem(ftdi, cmdstatus, &status);
if (retval) if (retval)
return retval; return retval;
...@@ -2744,8 +2744,8 @@ static int ftdi_elan_setupOHCI(struct usb_ftdi *ftdi) ...@@ -2744,8 +2744,8 @@ static int ftdi_elan_setupOHCI(struct usb_ftdi *ftdi)
/* /*
* we use only the first bulk-in and bulk-out endpoints * we use only the first bulk-in and bulk-out endpoints
*/ */
static int ftdi_elan_probe(struct usb_interface *interface, static int ftdi_elan_probe(struct usb_interface *interface,
const struct usb_device_id *id) const struct usb_device_id *id)
{ {
...@@ -2839,7 +2839,7 @@ static int ftdi_elan_probe(struct usb_interface *interface, ...@@ -2839,7 +2839,7 @@ static int ftdi_elan_probe(struct usb_interface *interface,
retval = -ENODEV; retval = -ENODEV;
goto error; goto error;
} }
error:if (ftdi) { error:if (ftdi) {
ftdi_elan_put_kref(ftdi); ftdi_elan_put_kref(ftdi);
} }
return retval; return retval;
...@@ -2911,11 +2911,11 @@ static int __init ftdi_elan_init(void) ...@@ -2911,11 +2911,11 @@ static int __init ftdi_elan_init(void)
} }
return result; return result;
err_respond_queue: err_respond_queue:
destroy_workqueue(command_queue); destroy_workqueue(command_queue);
err_command_queue: err_command_queue:
destroy_workqueue(status_queue); destroy_workqueue(status_queue);
err_status_queue: err_status_queue:
printk(KERN_ERR "%s couldn't create workqueue\n", ftdi_elan_driver.name); printk(KERN_ERR "%s couldn't create workqueue\n", ftdi_elan_driver.name);
return -ENOMEM; return -ENOMEM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment