diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-05-25 12:17:06 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:39 -0400 |
commit | 208fdd2f447899164bd139452c291b155e53cee9 (patch) | |
tree | c65f6dd5ad6846ea7179ece65594033a8dca9731 /drivers/net/wireless/libertas/if_usb.c | |
parent | 0583e8ef149700ede2aa181509e217c39e565f28 (diff) |
[PATCH] libertas: indirect all hardware access via hw_XXXX functions
This functions makes all libertas_sbi_XXX functions static to the
if_usb.c file and renames them to if_usb_XXXX(). The get called from
other places of the source code via priv->hw_XXXX().
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/if_usb.c')
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index d4db8e668e7..5b0e0f76f40 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c @@ -7,7 +7,6 @@ #include <linux/usb.h> #include "host.h" -#include "sbi.h" #include "decl.h" #include "defs.h" #include "dev.h" @@ -33,6 +32,12 @@ MODULE_DEVICE_TABLE(usb, if_usb_table); static void if_usb_receive(struct urb *urb); static void if_usb_receive_fwload(struct urb *urb); static int reset_device(wlan_private *priv); +static int if_usb_register_dev(wlan_private * priv); +static int if_usb_unregister_dev(wlan_private *); +static int if_usb_prog_firmware(wlan_private *); +static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb); +static int if_usb_get_int_status(wlan_private * priv, u8 *); +static int if_usb_read_event_cause(wlan_private *); /** * @brief call back function to handle the status of the URB @@ -192,7 +197,7 @@ static int if_usb_probe(struct usb_interface *intf, /* At this point wlan_add_card() will be called. Don't worry * about keeping pwlanpriv around since it will be set on our - * usb device data in -> add() -> libertas_sbi_register_dev(). + * usb device data in -> add() -> hw_register_dev() -> if_usb_register_dev. */ if (!(priv = wlan_add_card(usb_cardp))) goto dealloc; @@ -200,6 +205,13 @@ static int if_usb_probe(struct usb_interface *intf, if (wlan_add_mesh(priv)) goto err_add_mesh; + priv->hw_register_dev = if_usb_register_dev; + priv->hw_unregister_dev = if_usb_unregister_dev; + priv->hw_prog_firmware = if_usb_prog_firmware; + priv->hw_host_to_card = if_usb_host_to_card; + priv->hw_get_int_status = if_usb_get_int_status; + priv->hw_read_event_cause = if_usb_read_event_cause; + if (libertas_activate_card(priv)) goto err_activate_card; @@ -702,7 +714,7 @@ rx_exit: * @param len number of bytes * @return 0 or -1 */ -int libertas_sbi_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb) +static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb) { int ret = -1; u32 tmp; @@ -733,7 +745,7 @@ int libertas_sbi_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb } /* called with adapter->driver_lock held */ -int libertas_sbi_get_int_status(wlan_private * priv, u8 * ireg) +static int if_usb_get_int_status(wlan_private * priv, u8 * ireg) { struct usb_card_rec *cardp = priv->wlan_dev.card; @@ -745,7 +757,7 @@ int libertas_sbi_get_int_status(wlan_private * priv, u8 * ireg) return 0; } -int libertas_sbi_read_event_cause(wlan_private * priv) +static int if_usb_read_event_cause(wlan_private * priv) { struct usb_card_rec *cardp = priv->wlan_dev.card; priv->adapter->eventcause = cardp->usb_event_cause; @@ -767,7 +779,7 @@ static int reset_device(wlan_private *priv) return ret; } -int libertas_sbi_unregister_dev(wlan_private * priv) +static int if_usb_unregister_dev(wlan_private * priv) { int ret = 0; @@ -787,7 +799,7 @@ int libertas_sbi_unregister_dev(wlan_private * priv) * @param priv pointer to wlan_private * @return 0 or -1 */ -int libertas_sbi_register_dev(wlan_private * priv) +static int if_usb_register_dev(wlan_private * priv) { struct usb_card_rec *cardp = (struct usb_card_rec *)priv->wlan_dev.card; @@ -809,7 +821,7 @@ int libertas_sbi_register_dev(wlan_private * priv) -int libertas_sbi_prog_firmware(wlan_private * priv) +static int if_usb_prog_firmware(wlan_private * priv) { struct usb_card_rec *cardp = priv->wlan_dev.card; int i = 0; @@ -959,7 +971,7 @@ static struct usb_driver if_usb_driver = { * @param arg pointer to call back function parameter * @return dummy success variable */ -int libertas_sbi_register(void) +int if_usb_register(void) { /* * API registers the Marvell USB driver @@ -975,7 +987,7 @@ int libertas_sbi_register(void) * @brief This function removes usb driver. * @return N/A */ -void libertas_sbi_unregister(void) +void if_usb_unregister(void) { int i; |