summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/whiteheat.c
diff options
context:
space:
mode:
authorRene Buergel <rene.buergel@sohard.de>2012-09-13 22:14:38 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-13 21:59:51 -0700
commit99495c7061892f0312c0119725b550bb221634ce (patch)
treecde4743b6d5461d666f5158080a24dba057abfe6 /drivers/usb/serial/whiteheat.c
parent8321652ae22f38830af5b553f3a316d68948ddce (diff)
USB: ezusb: remove dependancy on usb_serial
This patch removes the dependency on the usb_serial interface and names some magic constants Signed-off-by: René Bürgel <rene.buergel@sohard.de> -- Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/whiteheat.c')
-rw-r--r--drivers/usb/serial/whiteheat.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 473635e7f5d..fc72591711e 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -213,13 +213,13 @@ static int whiteheat_firmware_download(struct usb_serial *serial,
goto out;
}
ret = 0;
- response = ezusb_set_reset (serial, 1);
+ response = ezusb_set_reset(serial->dev, 1);
record = (const struct ihex_binrec *)loader_fw->data;
while (record) {
- response = ezusb_writememory (serial, be32_to_cpu(record->addr),
- (unsigned char *)record->data,
- be16_to_cpu(record->len), 0xa0);
+ response = ezusb_writememory(serial->dev, be32_to_cpu(record->addr),
+ (unsigned char *)record->data,
+ be16_to_cpu(record->len), 0xa0);
if (response < 0) {
dev_err(&serial->dev->dev, "%s - ezusb_writememory "
"failed for loader (%d %04X %p %d)\n",
@@ -230,15 +230,15 @@ static int whiteheat_firmware_download(struct usb_serial *serial,
record = ihex_next_binrec(record);
}
- response = ezusb_set_reset(serial, 0);
+ response = ezusb_set_reset(serial->dev, 0);
record = (const struct ihex_binrec *)firmware_fw->data;
while (record && be32_to_cpu(record->addr) < 0x1b40)
record = ihex_next_binrec(record);
while (record) {
- response = ezusb_writememory (serial, be32_to_cpu(record->addr),
- (unsigned char *)record->data,
- be16_to_cpu(record->len), 0xa3);
+ response = ezusb_writememory(serial->dev, be32_to_cpu(record->addr),
+ (unsigned char *)record->data,
+ be16_to_cpu(record->len), 0xa3);
if (response < 0) {
dev_err(&serial->dev->dev, "%s - ezusb_writememory "
"failed for first firmware step "
@@ -250,13 +250,13 @@ static int whiteheat_firmware_download(struct usb_serial *serial,
++record;
}
- response = ezusb_set_reset(serial, 1);
+ response = ezusb_set_reset(serial->dev, 1);
record = (const struct ihex_binrec *)firmware_fw->data;
while (record && be32_to_cpu(record->addr) < 0x1b40) {
- response = ezusb_writememory (serial, be32_to_cpu(record->addr),
- (unsigned char *)record->data,
- be16_to_cpu(record->len), 0xa0);
+ response = ezusb_writememory(serial->dev, be32_to_cpu(record->addr),
+ (unsigned char *)record->data,
+ be16_to_cpu(record->len), 0xa0);
if (response < 0) {
dev_err(&serial->dev->dev, "%s - ezusb_writememory "
"failed for second firmware step "
@@ -268,7 +268,7 @@ static int whiteheat_firmware_download(struct usb_serial *serial,
++record;
}
ret = 0;
- response = ezusb_set_reset (serial, 0);
+ response = ezusb_set_reset(serial->dev, 0);
out:
release_firmware(loader_fw);
release_firmware(firmware_fw);