iwlagn: kill iwlagn_setup_deferred_work
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 3 Jul 2011 12:45:34 +0000 (15:45 +0300)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Thu, 21 Jul 2011 14:28:03 +0000 (07:28 -0700)
Since iwlagn_setup_deferred_work is always called, fold it into
iwl_setup_deferred_work. BT related works are setup by the new
bt_setup_deferred_work lib_ops.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-2000.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-agn.h
drivers/net/wireless/iwlwifi/iwl-core.h

index 5fa171954099429169deafb8e1e236e7add132ad..01b49eb8c8ecca2f266eb1f92d045a338661f5b9 100644 (file)
@@ -168,7 +168,6 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv)
 
 static struct iwl_lib_ops iwl1000_lib = {
        .set_hw_params = iwl1000_hw_set_hw_params,
-       .setup_deferred_work = iwlagn_setup_deferred_work,
        .nic_config = iwl1000_nic_config,
        .eeprom_ops = {
                .regulatory_bands = {
index c913410380c395d1f72f9e310a7532105fbaa523..aff555c4c49a97a829f52c665014ecb6a984c534 100644 (file)
@@ -167,7 +167,6 @@ static int iwl2000_hw_set_hw_params(struct iwl_priv *priv)
 
 static struct iwl_lib_ops iwl2000_lib = {
        .set_hw_params = iwl2000_hw_set_hw_params,
-       .setup_deferred_work = iwlagn_setup_deferred_work,
        .nic_config = iwl2000_nic_config,
        .eeprom_ops = {
                .regulatory_bands = {
@@ -187,7 +186,7 @@ static struct iwl_lib_ops iwl2000_lib = {
 static struct iwl_lib_ops iwl2030_lib = {
        .set_hw_params = iwl2000_hw_set_hw_params,
        .bt_rx_handler_setup = iwlagn_bt_rx_handler_setup,
-       .setup_deferred_work = iwlagn_bt_setup_deferred_work,
+       .bt_setup_deferred_work = iwlagn_bt_setup_deferred_work,
        .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
        .nic_config = iwl2000_nic_config,
        .eeprom_ops = {
index 4e1204a5ff681c9102d2fad0a30acb2f5eed622a..8c6fbd74b8dac1a874cbaf2fdb07676c45d6a0d0 100644 (file)
@@ -320,7 +320,6 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
 
 static struct iwl_lib_ops iwl5000_lib = {
        .set_hw_params = iwl5000_hw_set_hw_params,
-       .setup_deferred_work = iwlagn_setup_deferred_work,
        .set_channel_switch = iwl5000_hw_channel_switch,
        .nic_config = iwl5000_nic_config,
        .eeprom_ops = {
@@ -339,7 +338,6 @@ static struct iwl_lib_ops iwl5000_lib = {
 
 static struct iwl_lib_ops iwl5150_lib = {
        .set_hw_params = iwl5150_hw_set_hw_params,
-       .setup_deferred_work = iwlagn_setup_deferred_work,
        .set_channel_switch = iwl5000_hw_channel_switch,
        .nic_config = iwl5000_nic_config,
        .eeprom_ops = {
index f1fdcdc21eb5b8df67863085b88f040d910b1e7d..ea48246f8dd3f00a1441036384cbab6a0fb3c5c2 100644 (file)
@@ -258,7 +258,6 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
 
 static struct iwl_lib_ops iwl6000_lib = {
        .set_hw_params = iwl6000_hw_set_hw_params,
-       .setup_deferred_work = iwlagn_setup_deferred_work,
        .set_channel_switch = iwl6000_hw_channel_switch,
        .nic_config = iwl6000_nic_config,
        .eeprom_ops = {
@@ -279,7 +278,7 @@ static struct iwl_lib_ops iwl6000_lib = {
 static struct iwl_lib_ops iwl6030_lib = {
        .set_hw_params = iwl6000_hw_set_hw_params,
        .bt_rx_handler_setup = iwlagn_bt_rx_handler_setup,
-       .setup_deferred_work = iwlagn_bt_setup_deferred_work,
+       .bt_setup_deferred_work = iwlagn_bt_setup_deferred_work,
        .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
        .set_channel_switch = iwl6000_hw_channel_switch,
        .nic_config = iwl6000_nic_config,
index 5d6258d08e2066803d5da186c3f1d0ec6511cff0..339a89ca4d7911d948f269947e7b93fa0322f709 100644 (file)
@@ -478,14 +478,6 @@ void iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
        spin_unlock_irqrestore(&priv->sta_lock, flags);
 }
 
-void iwlagn_setup_deferred_work(struct iwl_priv *priv)
-{
-       /*
-        * nothing need to be done here anymore
-        * still keep for future use if needed
-        */
-}
-
 int iwlagn_hw_valid_rtc_data_addr(u32 addr)
 {
        return (addr >= IWLAGN_RTC_DATA_LOWER_BOUND) &&
@@ -1754,8 +1746,6 @@ void iwlagn_bt_rx_handler_setup(struct iwl_priv *priv)
 
 void iwlagn_bt_setup_deferred_work(struct iwl_priv *priv)
 {
-       iwlagn_setup_deferred_work(priv);
-
        INIT_WORK(&priv->bt_traffic_change_work,
                  iwlagn_bt_traffic_change_work);
 }
index d50c68a072ab95c30abd8c9839595db3aec98b4c..503c78606bdc048cea8ebe5f0d7966237859cc69 100644 (file)
@@ -2845,8 +2845,8 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv)
 
        iwl_setup_scan_deferred_work(priv);
 
-       if (priv->cfg->lib->setup_deferred_work)
-               priv->cfg->lib->setup_deferred_work(priv);
+       if (priv->cfg->lib->bt_setup_deferred_work)
+               priv->cfg->lib->bt_setup_deferred_work(priv);
 
        init_timer(&priv->statistics_periodic);
        priv->statistics_periodic.data = (unsigned long)priv;
index d9fef639759c08f5b0302e9d5aa2d047fe5fb1cb..57c70b840a523a975595bdfcbf466be08026bf53 100644 (file)
@@ -162,7 +162,6 @@ int iwlagn_load_ucode_wait_alive(struct iwl_priv *priv,
 /* lib */
 void iwl_check_abort_status(struct iwl_priv *priv,
                            u8 frame_count, u32 status);
-void iwlagn_setup_deferred_work(struct iwl_priv *priv);
 int iwlagn_hw_valid_rtc_data_addr(u32 addr);
 int iwlagn_send_tx_power(struct iwl_priv *priv);
 void iwlagn_temperature(struct iwl_priv *priv);
index 6f825d3e50e9d2c6686d2157f1bf0469a92e2dad..a2cb1f59d9d529b2f1f1792cae7fe8826a9f6e85 100644 (file)
@@ -85,8 +85,8 @@ struct iwl_lib_ops {
        int (*set_hw_params)(struct iwl_priv *priv);
        /* setup BT Rx handler */
        void (*bt_rx_handler_setup)(struct iwl_priv *priv);
-       /* setup deferred work */
-       void (*setup_deferred_work)(struct iwl_priv *priv);
+       /* setup BT related deferred work */
+       void (*bt_setup_deferred_work)(struct iwl_priv *priv);
        /* cancel deferred work */
        void (*cancel_deferred_work)(struct iwl_priv *priv);
        int (*set_channel_switch)(struct iwl_priv *priv,