diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.h | 6 |
3 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 6b6e7b93d2ad..d0958008c013 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1672,8 +1672,7 @@ static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
1672 | static int rt2500usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | 1672 | static int rt2500usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) |
1673 | { | 1673 | { |
1674 | struct rt2x00_dev *rt2x00dev = hw->priv; | 1674 | struct rt2x00_dev *rt2x00dev = hw->priv; |
1675 | struct usb_device *usb_dev = | 1675 | struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev); |
1676 | interface_to_usbdev(to_usb_interface(rt2x00dev->dev)); | ||
1677 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 1676 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
1678 | struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif); | 1677 | struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif); |
1679 | struct queue_entry_priv_usb_bcn *bcn_priv; | 1678 | struct queue_entry_priv_usb_bcn *bcn_priv; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index b94c461fbaf9..5593b9a83108 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -40,8 +40,7 @@ int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev, | |||
40 | void *buffer, const u16 buffer_length, | 40 | void *buffer, const u16 buffer_length, |
41 | const int timeout) | 41 | const int timeout) |
42 | { | 42 | { |
43 | struct usb_device *usb_dev = | 43 | struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev); |
44 | interface_to_usbdev(to_usb_interface(rt2x00dev->dev)); | ||
45 | int status; | 44 | int status; |
46 | unsigned int i; | 45 | unsigned int i; |
47 | unsigned int pipe = | 46 | unsigned int pipe = |
@@ -162,8 +161,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb) | |||
162 | int rt2x00usb_write_tx_data(struct queue_entry *entry) | 161 | int rt2x00usb_write_tx_data(struct queue_entry *entry) |
163 | { | 162 | { |
164 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 163 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
165 | struct usb_device *usb_dev = | 164 | struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev); |
166 | interface_to_usbdev(to_usb_interface(rt2x00dev->dev)); | ||
167 | struct queue_entry_priv_usb *entry_priv = entry->priv_data; | 165 | struct queue_entry_priv_usb *entry_priv = entry->priv_data; |
168 | struct skb_frame_desc *skbdesc; | 166 | struct skb_frame_desc *skbdesc; |
169 | u32 length; | 167 | u32 length; |
@@ -319,8 +317,7 @@ EXPORT_SYMBOL_GPL(rt2x00usb_disable_radio); | |||
319 | void rt2x00usb_init_rxentry(struct rt2x00_dev *rt2x00dev, | 317 | void rt2x00usb_init_rxentry(struct rt2x00_dev *rt2x00dev, |
320 | struct queue_entry *entry) | 318 | struct queue_entry *entry) |
321 | { | 319 | { |
322 | struct usb_device *usb_dev = | 320 | struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev); |
323 | interface_to_usbdev(to_usb_interface(rt2x00dev->dev)); | ||
324 | struct queue_entry_priv_usb *entry_priv = entry->priv_data; | 321 | struct queue_entry_priv_usb *entry_priv = entry->priv_data; |
325 | 322 | ||
326 | usb_fill_bulk_urb(entry_priv->urb, usb_dev, | 323 | usb_fill_bulk_urb(entry_priv->urb, usb_dev, |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h index b1187c812e7f..aad794adf52c 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.h +++ b/drivers/net/wireless/rt2x00/rt2x00usb.h | |||
@@ -26,6 +26,12 @@ | |||
26 | #ifndef RT2X00USB_H | 26 | #ifndef RT2X00USB_H |
27 | #define RT2X00USB_H | 27 | #define RT2X00USB_H |
28 | 28 | ||
29 | #define to_usb_device_intf(d) \ | ||
30 | ({ \ | ||
31 | struct usb_interface *intf = to_usb_interface(d); \ | ||
32 | interface_to_usbdev(intf); \ | ||
33 | }) | ||
34 | |||
29 | /* | 35 | /* |
30 | * This variable should be used with the | 36 | * This variable should be used with the |
31 | * usb_driver structure initialization. | 37 | * usb_driver structure initialization. |