diff options
author | Duncan Sands <baldrick@free.fr> | 2006-01-17 05:15:13 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-31 20:23:39 -0500 |
commit | 0ec3c7e856319b600311750d784262caa8ed94b9 (patch) | |
tree | 86d0b3aa9105a8b92bbfc514c5964c9abe7da0e7 /drivers/usb/atm/xusbatm.c | |
parent | 7ce08c93e388922e25a96a7d9895784182e4c72c (diff) |
[PATCH] USBATM: trivial modifications
Formatting, changes to variable names, comments, log level changes,
printk rate limiting.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/atm/xusbatm.c')
-rw-r--r-- | drivers/usb/atm/xusbatm.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/usb/atm/xusbatm.c b/drivers/usb/atm/xusbatm.c index 5c76e3aaaa5e..8f55642f376f 100644 --- a/drivers/usb/atm/xusbatm.c +++ b/drivers/usb/atm/xusbatm.c | |||
@@ -61,7 +61,7 @@ static int usb_intf_has_ep(const struct usb_interface *intf, u8 ep) | |||
61 | return 0; | 61 | return 0; |
62 | } | 62 | } |
63 | 63 | ||
64 | static int xusbatm_bind(struct usbatm_data *usbatm_instance, | 64 | static int xusbatm_bind(struct usbatm_data *usbatm, |
65 | struct usb_interface *intf, const struct usb_device_id *id, | 65 | struct usb_interface *intf, const struct usb_device_id *id, |
66 | int *need_heavy_init) | 66 | int *need_heavy_init) |
67 | { | 67 | { |
@@ -72,14 +72,14 @@ static int xusbatm_bind(struct usbatm_data *usbatm_instance, | |||
72 | u8 searched_ep = rx_ep_present ? tx_endpoint[drv_ix] : rx_endpoint[drv_ix]; | 72 | u8 searched_ep = rx_ep_present ? tx_endpoint[drv_ix] : rx_endpoint[drv_ix]; |
73 | int i, ret; | 73 | int i, ret; |
74 | 74 | ||
75 | usb_dbg(usbatm_instance, "%s: binding driver %d: vendor %#x product %#x" | 75 | usb_dbg(usbatm, "%s: binding driver %d: vendor %04x product %04x" |
76 | " rx: ep %#x padd %d tx: ep %#x padd %d\n", | 76 | " rx: ep %02x padd %d tx: ep %02x padd %d\n", |
77 | __func__, drv_ix, vendor[drv_ix], product[drv_ix], | 77 | __func__, drv_ix, vendor[drv_ix], product[drv_ix], |
78 | rx_endpoint[drv_ix], rx_padding[drv_ix], | 78 | rx_endpoint[drv_ix], rx_padding[drv_ix], |
79 | tx_endpoint[drv_ix], tx_padding[drv_ix]); | 79 | tx_endpoint[drv_ix], tx_padding[drv_ix]); |
80 | 80 | ||
81 | if (!rx_ep_present && !tx_ep_present) { | 81 | if (!rx_ep_present && !tx_ep_present) { |
82 | usb_dbg(usbatm_instance, "%s: intf #%d has neither rx (%#x) nor tx (%#x) endpoint\n", | 82 | usb_dbg(usbatm, "%s: intf #%d has neither rx (%#x) nor tx (%#x) endpoint\n", |
83 | __func__, intf->altsetting->desc.bInterfaceNumber, | 83 | __func__, intf->altsetting->desc.bInterfaceNumber, |
84 | rx_endpoint[drv_ix], tx_endpoint[drv_ix]); | 84 | rx_endpoint[drv_ix], tx_endpoint[drv_ix]); |
85 | return -ENODEV; | 85 | return -ENODEV; |
@@ -93,25 +93,26 @@ static int xusbatm_bind(struct usbatm_data *usbatm_instance, | |||
93 | 93 | ||
94 | if (cur_if != intf && usb_intf_has_ep(cur_if, searched_ep)) { | 94 | if (cur_if != intf && usb_intf_has_ep(cur_if, searched_ep)) { |
95 | ret = usb_driver_claim_interface(&xusbatm_usb_driver, | 95 | ret = usb_driver_claim_interface(&xusbatm_usb_driver, |
96 | cur_if, usbatm_instance); | 96 | cur_if, usbatm); |
97 | if (!ret) | 97 | if (!ret) |
98 | usb_err(usbatm_instance, "%s: failed to claim interface #%d (%d)\n", | 98 | usb_err(usbatm, "%s: failed to claim interface #%d (%d)\n", |
99 | __func__, cur_if->altsetting->desc.bInterfaceNumber, ret); | 99 | __func__, cur_if->altsetting->desc.bInterfaceNumber, ret); |
100 | return ret; | 100 | return ret; |
101 | } | 101 | } |
102 | } | 102 | } |
103 | 103 | ||
104 | usb_err(usbatm_instance, "%s: no interface has endpoint %#x\n", | 104 | usb_err(usbatm, "%s: no interface has endpoint %#x\n", |
105 | __func__, searched_ep); | 105 | __func__, searched_ep); |
106 | return -ENODEV; | 106 | return -ENODEV; |
107 | } | 107 | } |
108 | 108 | ||
109 | static void xusbatm_unbind(struct usbatm_data *usbatm_instance, | 109 | static void xusbatm_unbind(struct usbatm_data *usbatm, |
110 | struct usb_interface *intf) | 110 | struct usb_interface *intf) |
111 | { | 111 | { |
112 | struct usb_device *usb_dev = interface_to_usbdev(intf); | 112 | struct usb_device *usb_dev = interface_to_usbdev(intf); |
113 | int i; | 113 | int i; |
114 | usb_dbg(usbatm_instance, "%s entered\n", __func__); | 114 | |
115 | usb_dbg(usbatm, "%s entered\n", __func__); | ||
115 | 116 | ||
116 | for(i = 0; i < usb_dev->actconfig->desc.bNumInterfaces; i++) { | 117 | for(i = 0; i < usb_dev->actconfig->desc.bNumInterfaces; i++) { |
117 | struct usb_interface *cur_if = usb_dev->actconfig->interface[i]; | 118 | struct usb_interface *cur_if = usb_dev->actconfig->interface[i]; |
@@ -120,10 +121,10 @@ static void xusbatm_unbind(struct usbatm_data *usbatm_instance, | |||
120 | } | 121 | } |
121 | } | 122 | } |
122 | 123 | ||
123 | static int xusbatm_atm_start(struct usbatm_data *usbatm_instance, | 124 | static int xusbatm_atm_start(struct usbatm_data *usbatm, |
124 | struct atm_dev *atm_dev) | 125 | struct atm_dev *atm_dev) |
125 | { | 126 | { |
126 | atm_dbg(usbatm_instance, "%s entered\n", __func__); | 127 | atm_dbg(usbatm, "%s entered\n", __func__); |
127 | 128 | ||
128 | /* use random MAC as we've no way to get it from the device */ | 129 | /* use random MAC as we've no way to get it from the device */ |
129 | random_ether_addr(atm_dev->esi); | 130 | random_ether_addr(atm_dev->esi); |