aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm/xusbatm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/atm/xusbatm.c')
-rw-r--r--drivers/usb/atm/xusbatm.c23
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
64static int xusbatm_bind(struct usbatm_data *usbatm_instance, 64static 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
109static void xusbatm_unbind(struct usbatm_data *usbatm_instance, 109static 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
123static int xusbatm_atm_start(struct usbatm_data *usbatm_instance, 124static 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);