[PATCH] libertas: get rid of libertas_sbi_get_priv()
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Fri, 25 May 2007 15:55:19 +0000 (11:55 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Jun 2007 18:28:38 +0000 (14:28 -0400)
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>
drivers/net/wireless/libertas/decl.h
drivers/net/wireless/libertas/if_usb.c
drivers/net/wireless/libertas/main.c
drivers/net/wireless/libertas/sbi.h

index 9eed599f09a359c5e092d4d72bea744836c6ea5c..895f85331ce248b5221fdcdfb23f8072322d212a 100644 (file)
@@ -78,7 +78,7 @@ int reset_device(wlan_private *priv);
 extern struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band,
                                                             int *cfp_no);
 wlan_private *wlan_add_card(void *card);
-int wlan_remove_card(void *card);
+int wlan_remove_card(wlan_private *priv);
 int wlan_add_mesh(wlan_private *priv);
 void wlan_remove_mesh(wlan_private *priv);
 
index c1a662b065b099018db7a5cd554b1f4f1326118a..bf7ef6582c5961351c48d87b9ed666749feeb47d 100644 (file)
@@ -231,7 +231,7 @@ static void if_usb_disconnect(struct usb_interface *intf)
        /* card is removed and we can call wlan_remove_card */
        lbs_deb_usbd(&cardp->udev->dev, "call remove card\n");
        wlan_remove_mesh(priv);
-       wlan_remove_card(cardp);
+       wlan_remove_card(priv);
 
        /* Unlink and free urb */
        if_usb_free(cardp);
@@ -854,17 +854,6 @@ done:
        return ret;
 }
 
-/**
- *  @brief Given a usb_card_rec return its wlan_private
- *  @param card                pointer to a usb_card_rec
- *  @return            pointer to wlan_private
- */
-wlan_private *libertas_sbi_get_priv(void *card)
-{
-       struct usb_card_rec *cardp = card;
-       return cardp->priv;
-}
-
 #ifdef CONFIG_PM
 static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
 {
index b0cc42b67efb99f2c8dabf92ddb9dfba5b25d44f..f9369e50da3c62bb4685328da484b3cd4de3fb59 100644 (file)
@@ -963,9 +963,8 @@ static void wake_pending_cmdnodes(wlan_private *priv)
 }
 
 
-int wlan_remove_card(void *card)
+int wlan_remove_card(wlan_private *priv)
 {
-       wlan_private *priv = libertas_sbi_get_priv(card);
        wlan_adapter *adapter;
        struct net_device *dev;
        union iwreq_data wrqu;
index c8fe5d05eb76ab9b6eb9f880c0aebe6f322e47cb..d999078c3d1adf4bfae7be59f3992b4dc23a891f 100644 (file)
@@ -26,6 +26,5 @@ int libertas_sbi_prog_firmware(wlan_private *);
 
 int libertas_sbi_read_event_cause(wlan_private *);
 int libertas_sbi_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb);
-wlan_private *libertas_sbi_get_priv(void *card);
 
 #endif                         /* _SBI_H */