iwlagn: remove un-necessary function pointer
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Wed, 30 Mar 2011 00:53:15 +0000 (17:53 -0700)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 8 Apr 2011 14:59:25 +0000 (07:59 -0700)
After driver split, no need to use function pointer for those event and
register dump function.

Signed-off-by: Wey-Yi Guy <wey-yi.w.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.h
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-debugfs.c

index 4323d27cc9f63b1f726fe8c8963f9e0fe1914ede..cb2f87101f9d38d4a759547da86fa27329145e83 100644 (file)
@@ -182,10 +182,6 @@ static struct iwl_lib_ops iwl1000_lib = {
        .rx_handler_setup = iwlagn_rx_handler_setup,
        .setup_deferred_work = iwlagn_setup_deferred_work,
        .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-       .dump_nic_event_log = iwl_dump_nic_event_log,
-       .dump_nic_error_log = iwl_dump_nic_error_log,
-       .dump_csr = iwl_dump_csr,
-       .dump_fh = iwl_dump_fh,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .apm_ops = {
index 564477d091533d694a7c6bfe355f23d6da077e4a..e73ac80a721e3d3871983eba33887e67398e67d2 100644 (file)
@@ -262,10 +262,6 @@ static struct iwl_lib_ops iwl2000_lib = {
        .setup_deferred_work = iwlagn_bt_setup_deferred_work,
        .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
        .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-       .dump_nic_event_log = iwl_dump_nic_event_log,
-       .dump_nic_error_log = iwl_dump_nic_error_log,
-       .dump_csr = iwl_dump_csr,
-       .dump_fh = iwl_dump_fh,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .set_channel_switch = iwl2030_hw_channel_switch,
index 4dafc58800d9452ed8a4f96c521b37eeaecaa9aa..4c8f72a77a721bd1cdc0fc97f06c9246b8ebc410 100644 (file)
@@ -350,10 +350,6 @@ static struct iwl_lib_ops iwl5000_lib = {
        .rx_handler_setup = iwlagn_rx_handler_setup,
        .setup_deferred_work = iwlagn_setup_deferred_work,
        .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-       .dump_nic_event_log = iwl_dump_nic_event_log,
-       .dump_nic_error_log = iwl_dump_nic_error_log,
-       .dump_csr = iwl_dump_csr,
-       .dump_fh = iwl_dump_fh,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .set_channel_switch = iwl5000_hw_channel_switch,
@@ -406,9 +402,6 @@ static struct iwl_lib_ops iwl5150_lib = {
        .rx_handler_setup = iwlagn_rx_handler_setup,
        .setup_deferred_work = iwlagn_setup_deferred_work,
        .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-       .dump_nic_event_log = iwl_dump_nic_event_log,
-       .dump_nic_error_log = iwl_dump_nic_error_log,
-       .dump_csr = iwl_dump_csr,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .set_channel_switch = iwl5000_hw_channel_switch,
index 9fb2a42e5ea00fcdc9f6e9a603dc625886e91453..80a335fc78cb7dea1ff32813ea6a9c054740d80e 100644 (file)
@@ -289,10 +289,6 @@ static struct iwl_lib_ops iwl6000_lib = {
        .rx_handler_setup = iwlagn_rx_handler_setup,
        .setup_deferred_work = iwlagn_setup_deferred_work,
        .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-       .dump_nic_event_log = iwl_dump_nic_event_log,
-       .dump_nic_error_log = iwl_dump_nic_error_log,
-       .dump_csr = iwl_dump_csr,
-       .dump_fh = iwl_dump_fh,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .set_channel_switch = iwl6000_hw_channel_switch,
@@ -347,10 +343,6 @@ static struct iwl_lib_ops iwl6030_lib = {
        .setup_deferred_work = iwlagn_bt_setup_deferred_work,
        .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
        .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-       .dump_nic_event_log = iwl_dump_nic_event_log,
-       .dump_nic_error_log = iwl_dump_nic_error_log,
-       .dump_csr = iwl_dump_csr,
-       .dump_fh = iwl_dump_fh,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .set_channel_switch = iwl6000_hw_channel_switch,
index 016b79e4421e59c2287ea7ed2aff92f21156efdb..290a2081469247526a24ee954957d047e8b2b8ae 100644 (file)
@@ -173,8 +173,6 @@ int iwlagn_hw_nic_init(struct iwl_priv *priv);
 int iwlagn_wait_tx_queue_empty(struct iwl_priv *priv);
 int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control);
 void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control);
-void iwl_dump_csr(struct iwl_priv *priv);
-int iwl_dump_fh(struct iwl_priv *priv, char **buf, bool display);
 
 /* rx */
 void iwlagn_rx_queue_restock(struct iwl_priv *priv);
index c46be36b9e2ef100a346948faeee0b29112a75b6..5e7281c22c0b7285cd53fecbb08791569e46c630 100644 (file)
@@ -965,12 +965,10 @@ void iwl_irq_handle_error(struct iwl_priv *priv)
        IWL_ERR(priv, "Loaded firmware version: %s\n",
                priv->hw->wiphy->fw_version);
 
-       priv->cfg->ops->lib->dump_nic_error_log(priv);
-       if (priv->cfg->ops->lib->dump_csr)
-               priv->cfg->ops->lib->dump_csr(priv);
-       if (priv->cfg->ops->lib->dump_fh)
-               priv->cfg->ops->lib->dump_fh(priv, NULL, false);
-       priv->cfg->ops->lib->dump_nic_event_log(priv, false, NULL, false);
+       iwl_dump_nic_error_log(priv);
+       iwl_dump_csr(priv);
+       iwl_dump_fh(priv, NULL, false);
+       iwl_dump_nic_event_log(priv, false, NULL, false);
 #ifdef CONFIG_IWLWIFI_DEBUG
        if (iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS)
                iwl_print_rx_config_cmd(priv,
index 82939f851eb9f40559a26fbc3a8ebc77063d3f39..43d4c92268e787fc3696c53fc8922bc830e0f65f 100644 (file)
@@ -171,12 +171,6 @@ struct iwl_lib_ops {
        void (*cancel_deferred_work)(struct iwl_priv *priv);
        /* check validity of rtc data address */
        int (*is_valid_rtc_data_addr)(u32 addr);
-
-       int (*dump_nic_event_log)(struct iwl_priv *priv,
-                                 bool full_log, char **buf, bool display);
-       void (*dump_nic_error_log)(struct iwl_priv *priv);
-       void (*dump_csr)(struct iwl_priv *priv);
-       int (*dump_fh)(struct iwl_priv *priv, char **buf, bool display);
        int (*set_channel_switch)(struct iwl_priv *priv,
                                  struct ieee80211_channel_switch *ch_switch);
        /* power management */
@@ -598,6 +592,8 @@ extern const struct dev_pm_ops iwl_pm_ops;
 void iwl_dump_nic_error_log(struct iwl_priv *priv);
 int iwl_dump_nic_event_log(struct iwl_priv *priv,
                           bool full_log, char **buf, bool display);
+void iwl_dump_csr(struct iwl_priv *priv);
+int iwl_dump_fh(struct iwl_priv *priv, char **buf, bool display);
 #ifdef CONFIG_IWLWIFI_DEBUG
 void iwl_print_rx_config_cmd(struct iwl_priv *priv,
                             struct iwl_rxon_context *ctx);
index 92f6efd2c73f4c443d2f087617bb16d4b7ecb201..93a86998a3b1d79ee691320355725c1d5567bf7f 100644 (file)
@@ -437,8 +437,7 @@ static ssize_t iwl_dbgfs_log_event_read(struct file *file,
        int pos = 0;
        ssize_t ret = -ENOMEM;
 
-       ret = pos = priv->cfg->ops->lib->dump_nic_event_log(
-                                       priv, true, &buf, true);
+       ret = pos = iwl_dump_nic_event_log(priv, true, &buf, true);
        if (buf) {
                ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
                kfree(buf);
@@ -462,8 +461,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
        if (sscanf(buf, "%d", &event_log_flag) != 1)
                return -EFAULT;
        if (event_log_flag == 1)
-               priv->cfg->ops->lib->dump_nic_event_log(priv, true,
-                                                       NULL, false);
+               iwl_dump_nic_event_log(priv, true, NULL, false);
 
        return count;
 }
@@ -1268,8 +1266,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file,
        if (sscanf(buf, "%d", &csr) != 1)
                return -EFAULT;
 
-       if (priv->cfg->ops->lib->dump_csr)
-               priv->cfg->ops->lib->dump_csr(priv);
+       iwl_dump_csr(priv);
 
        return count;
 }
@@ -1359,13 +1356,11 @@ static ssize_t iwl_dbgfs_fh_reg_read(struct file *file,
        int pos = 0;
        ssize_t ret = -EFAULT;
 
-       if (priv->cfg->ops->lib->dump_fh) {
-               ret = pos = priv->cfg->ops->lib->dump_fh(priv, &buf, true);
-               if (buf) {
-                       ret = simple_read_from_buffer(user_buf,
-                                                     count, ppos, buf, pos);
-                       kfree(buf);
-               }
+       ret = pos = iwl_dump_fh(priv, &buf, true);
+       if (buf) {
+               ret = simple_read_from_buffer(user_buf,
+                                             count, ppos, buf, pos);
+               kfree(buf);
        }
 
        return ret;
This page took 0.033912 seconds and 5 git commands to generate.