diff options
author | Alan Cox <alan@redhat.com> | 2008-07-22 06:09:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 16:03:22 -0400 |
commit | 80359a9c5c03d585686e2596c9ee46703eb03047 (patch) | |
tree | dcf823d8b97c50c0a0f310936c351af3516574ac /drivers/usb/serial/ezusb.c | |
parent | 95da310e66ee8090119596c70ca8432e57f9a97f (diff) |
whiteheat: coding style
Bring ezusb and whiteheat into line with the coding style
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/serial/ezusb.c')
-rw-r--r-- | drivers/usb/serial/ezusb.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/usb/serial/ezusb.c b/drivers/usb/serial/ezusb.c index cc4fbd9d60be..711e84f6ed82 100644 --- a/drivers/usb/serial/ezusb.c +++ b/drivers/usb/serial/ezusb.c | |||
@@ -20,7 +20,8 @@ | |||
20 | /* EZ-USB Control and Status Register. Bit 0 controls 8051 reset */ | 20 | /* EZ-USB Control and Status Register. Bit 0 controls 8051 reset */ |
21 | #define CPUCS_REG 0x7F92 | 21 | #define CPUCS_REG 0x7F92 |
22 | 22 | ||
23 | int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest) | 23 | int ezusb_writememory(struct usb_serial *serial, int address, |
24 | unsigned char *data, int length, __u8 request) | ||
24 | { | 25 | { |
25 | int result; | 26 | int result; |
26 | unsigned char *transfer_buffer; | 27 | unsigned char *transfer_buffer; |
@@ -33,26 +34,27 @@ int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *da | |||
33 | 34 | ||
34 | transfer_buffer = kmemdup(data, length, GFP_KERNEL); | 35 | transfer_buffer = kmemdup(data, length, GFP_KERNEL); |
35 | if (!transfer_buffer) { | 36 | if (!transfer_buffer) { |
36 | dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __func__, length); | 37 | dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", |
38 | __func__, length); | ||
37 | return -ENOMEM; | 39 | return -ENOMEM; |
38 | } | 40 | } |
39 | result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 3000); | 41 | result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), |
40 | kfree (transfer_buffer); | 42 | request, 0x40, address, 0, transfer_buffer, length, 3000); |
43 | kfree(transfer_buffer); | ||
41 | return result; | 44 | return result; |
42 | } | 45 | } |
46 | EXPORT_SYMBOL_GPL(ezusb_writememory); | ||
43 | 47 | ||
44 | int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit) | 48 | int ezusb_set_reset(struct usb_serial *serial, unsigned char reset_bit) |
45 | { | 49 | { |
46 | int response; | 50 | int response; |
47 | 51 | ||
48 | /* dbg("%s - %d", __func__, reset_bit); */ | 52 | /* dbg("%s - %d", __func__, reset_bit); */ |
49 | response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0); | 53 | response = ezusb_writememory(serial, CPUCS_REG, &reset_bit, 1, 0xa0); |
50 | if (response < 0) | 54 | if (response < 0) |
51 | dev_err(&serial->dev->dev, "%s- %d failed\n", __func__, reset_bit); | 55 | dev_err(&serial->dev->dev, "%s- %d failed\n", |
56 | __func__, reset_bit); | ||
52 | return response; | 57 | return response; |
53 | } | 58 | } |
54 | |||
55 | |||
56 | EXPORT_SYMBOL_GPL(ezusb_writememory); | ||
57 | EXPORT_SYMBOL_GPL(ezusb_set_reset); | 59 | EXPORT_SYMBOL_GPL(ezusb_set_reset); |
58 | 60 | ||