aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-05-25 11:55:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-06-11 14:28:38 -0400
commit1ac812f161801c276dd520def0e81b9938eb7761 (patch)
tree7faaf3a9631daed7fa0814ca162f3a2ffc424467
parented37b51610ff4e853893a92bb725bab99d17b236 (diff)
[PATCH] libertas: get rid of libertas_sbi_get_priv()
It's not really needed, because we can call wlan_remove_card() with wlan_private* anyway. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/libertas/decl.h2
-rw-r--r--drivers/net/wireless/libertas/if_usb.c13
-rw-r--r--drivers/net/wireless/libertas/main.c3
-rw-r--r--drivers/net/wireless/libertas/sbi.h1
4 files changed, 3 insertions, 16 deletions
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h
index 9eed599f09a3..895f85331ce2 100644
--- a/drivers/net/wireless/libertas/decl.h
+++ b/drivers/net/wireless/libertas/decl.h
@@ -78,7 +78,7 @@ int reset_device(wlan_private *priv);
78extern struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band, 78extern struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band,
79 int *cfp_no); 79 int *cfp_no);
80wlan_private *wlan_add_card(void *card); 80wlan_private *wlan_add_card(void *card);
81int wlan_remove_card(void *card); 81int wlan_remove_card(wlan_private *priv);
82int wlan_add_mesh(wlan_private *priv); 82int wlan_add_mesh(wlan_private *priv);
83void wlan_remove_mesh(wlan_private *priv); 83void wlan_remove_mesh(wlan_private *priv);
84 84
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index c1a662b065b0..bf7ef6582c59 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -231,7 +231,7 @@ static void if_usb_disconnect(struct usb_interface *intf)
231 /* card is removed and we can call wlan_remove_card */ 231 /* card is removed and we can call wlan_remove_card */
232 lbs_deb_usbd(&cardp->udev->dev, "call remove card\n"); 232 lbs_deb_usbd(&cardp->udev->dev, "call remove card\n");
233 wlan_remove_mesh(priv); 233 wlan_remove_mesh(priv);
234 wlan_remove_card(cardp); 234 wlan_remove_card(priv);
235 235
236 /* Unlink and free urb */ 236 /* Unlink and free urb */
237 if_usb_free(cardp); 237 if_usb_free(cardp);
@@ -854,17 +854,6 @@ done:
854 return ret; 854 return ret;
855} 855}
856 856
857/**
858 * @brief Given a usb_card_rec return its wlan_private
859 * @param card pointer to a usb_card_rec
860 * @return pointer to wlan_private
861 */
862wlan_private *libertas_sbi_get_priv(void *card)
863{
864 struct usb_card_rec *cardp = card;
865 return cardp->priv;
866}
867
868#ifdef CONFIG_PM 857#ifdef CONFIG_PM
869static int if_usb_suspend(struct usb_interface *intf, pm_message_t message) 858static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
870{ 859{
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index b0cc42b67efb..f9369e50da3c 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -963,9 +963,8 @@ static void wake_pending_cmdnodes(wlan_private *priv)
963} 963}
964 964
965 965
966int wlan_remove_card(void *card) 966int wlan_remove_card(wlan_private *priv)
967{ 967{
968 wlan_private *priv = libertas_sbi_get_priv(card);
969 wlan_adapter *adapter; 968 wlan_adapter *adapter;
970 struct net_device *dev; 969 struct net_device *dev;
971 union iwreq_data wrqu; 970 union iwreq_data wrqu;
diff --git a/drivers/net/wireless/libertas/sbi.h b/drivers/net/wireless/libertas/sbi.h
index c8fe5d05eb76..d999078c3d1a 100644
--- a/drivers/net/wireless/libertas/sbi.h
+++ b/drivers/net/wireless/libertas/sbi.h
@@ -26,6 +26,5 @@ int libertas_sbi_prog_firmware(wlan_private *);
26 26
27int libertas_sbi_read_event_cause(wlan_private *); 27int libertas_sbi_read_event_cause(wlan_private *);
28int libertas_sbi_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb); 28int libertas_sbi_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb);
29wlan_private *libertas_sbi_get_priv(void *card);
30 29
31#endif /* _SBI_H */ 30#endif /* _SBI_H */