[PATCH] drivers/net/wireless/ipw2200: possible cleanups

This patch contains the following possible cleanups:
- make needlessly global functions static
- "extern inline" -> "static inline"
- #if 0 the unused global function ipw_led_activity_on()

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Adrian Bunk 2006-01-21 01:39:42 +01:00 committed by John W. Linville
parent 3c398b8612
commit a73e22b286
2 changed files with 20 additions and 17 deletions

View File

@ -701,7 +701,7 @@ static void ipw_init_ordinals(struct ipw_priv *priv)
}
u32 ipw_register_toggle(u32 reg)
static u32 ipw_register_toggle(u32 reg)
{
reg &= ~IPW_START_STANDBY;
if (reg & IPW_GATE_ODMA)
@ -726,7 +726,7 @@ u32 ipw_register_toggle(u32 reg)
#define LD_TIME_LINK_OFF 2700
#define LD_TIME_ACT_ON 250
void ipw_led_link_on(struct ipw_priv *priv)
static void ipw_led_link_on(struct ipw_priv *priv)
{
unsigned long flags;
u32 led;
@ -769,7 +769,7 @@ static void ipw_bg_led_link_on(void *data)
up(&priv->sem);
}
void ipw_led_link_off(struct ipw_priv *priv)
static void ipw_led_link_off(struct ipw_priv *priv)
{
unsigned long flags;
u32 led;
@ -847,6 +847,7 @@ static void __ipw_led_activity_on(struct ipw_priv *priv)
}
}
#if 0
void ipw_led_activity_on(struct ipw_priv *priv)
{
unsigned long flags;
@ -854,8 +855,9 @@ void ipw_led_activity_on(struct ipw_priv *priv)
__ipw_led_activity_on(priv);
spin_unlock_irqrestore(&priv->lock, flags);
}
#endif /* 0 */
void ipw_led_activity_off(struct ipw_priv *priv)
static void ipw_led_activity_off(struct ipw_priv *priv)
{
unsigned long flags;
u32 led;
@ -890,7 +892,7 @@ static void ipw_bg_led_activity_off(void *data)
up(&priv->sem);
}
void ipw_led_band_on(struct ipw_priv *priv)
static void ipw_led_band_on(struct ipw_priv *priv)
{
unsigned long flags;
u32 led;
@ -925,7 +927,7 @@ void ipw_led_band_on(struct ipw_priv *priv)
spin_unlock_irqrestore(&priv->lock, flags);
}
void ipw_led_band_off(struct ipw_priv *priv)
static void ipw_led_band_off(struct ipw_priv *priv)
{
unsigned long flags;
u32 led;
@ -948,24 +950,24 @@ void ipw_led_band_off(struct ipw_priv *priv)
spin_unlock_irqrestore(&priv->lock, flags);
}
void ipw_led_radio_on(struct ipw_priv *priv)
static void ipw_led_radio_on(struct ipw_priv *priv)
{
ipw_led_link_on(priv);
}
void ipw_led_radio_off(struct ipw_priv *priv)
static void ipw_led_radio_off(struct ipw_priv *priv)
{
ipw_led_activity_off(priv);
ipw_led_link_off(priv);
}
void ipw_led_link_up(struct ipw_priv *priv)
static void ipw_led_link_up(struct ipw_priv *priv)
{
/* Set the Link Led on for all nic types */
ipw_led_link_on(priv);
}
void ipw_led_link_down(struct ipw_priv *priv)
static void ipw_led_link_down(struct ipw_priv *priv)
{
ipw_led_activity_off(priv);
ipw_led_link_off(priv);
@ -974,7 +976,7 @@ void ipw_led_link_down(struct ipw_priv *priv)
ipw_led_radio_off(priv);
}
void ipw_led_init(struct ipw_priv *priv)
static void ipw_led_init(struct ipw_priv *priv)
{
priv->nic_type = priv->eeprom[EEPROM_NIC_TYPE];
@ -1025,7 +1027,7 @@ void ipw_led_init(struct ipw_priv *priv)
}
}
void ipw_led_shutdown(struct ipw_priv *priv)
static void ipw_led_shutdown(struct ipw_priv *priv)
{
ipw_led_activity_off(priv);
ipw_led_link_off(priv);
@ -6204,7 +6206,8 @@ static int ipw_wpa_set_auth_algs(struct ipw_priv *priv, int value)
return ret;
}
void ipw_wpa_assoc_frame(struct ipw_priv *priv, char *wpa_ie, int wpa_ie_len)
static void ipw_wpa_assoc_frame(struct ipw_priv *priv, char *wpa_ie,
int wpa_ie_len)
{
/* make sure WPA is enabled */
ipw_wpa_enable(priv, 1);
@ -10059,7 +10062,7 @@ static void ipw_bg_rf_kill(void *data)
up(&priv->sem);
}
void ipw_link_up(struct ipw_priv *priv)
static void ipw_link_up(struct ipw_priv *priv)
{
priv->last_seq_num = -1;
priv->last_frag_num = -1;
@ -10094,7 +10097,7 @@ static void ipw_bg_link_up(void *data)
up(&priv->sem);
}
void ipw_link_down(struct ipw_priv *priv)
static void ipw_link_down(struct ipw_priv *priv)
{
ipw_led_link_down(priv);
netif_carrier_off(priv->net_dev);

View File

@ -852,7 +852,7 @@ struct ipw_scan_request_ext {
u16 dwell_time[IPW_SCAN_TYPES];
} __attribute__ ((packed));
extern inline u8 ipw_get_scan_type(struct ipw_scan_request_ext *scan, u8 index)
static inline u8 ipw_get_scan_type(struct ipw_scan_request_ext *scan, u8 index)
{
if (index % 2)
return scan->scan_type[index / 2] & 0x0F;
@ -860,7 +860,7 @@ extern inline u8 ipw_get_scan_type(struct ipw_scan_request_ext *scan, u8 index)
return (scan->scan_type[index / 2] & 0xF0) >> 4;
}
extern inline void ipw_set_scan_type(struct ipw_scan_request_ext *scan,
static inline void ipw_set_scan_type(struct ipw_scan_request_ext *scan,
u8 index, u8 scan_type)
{
if (index % 2)