All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, Wey-Yi Guy <wey-yi.w.guy@intel.com>
Subject: [PATCH 12/21] iwlagn: remove double level temperature indirect call
Date: Fri,  8 Jul 2011 08:46:20 -0700	[thread overview]
Message-ID: <1310139989-27661-13-git-send-email-wey-yi.w.guy@intel.com> (raw)
In-Reply-To: <1310139989-27661-1-git-send-email-wey-yi.w.guy@intel.com>

No need to do double level indirect call after driver split
no functional changes

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-1000.c |    4 +---
 drivers/net/wireless/iwlwifi/iwl-2000.c |    4 +---
 drivers/net/wireless/iwlwifi/iwl-5000.c |    8 ++------
 drivers/net/wireless/iwlwifi/iwl-6000.c |    8 ++------
 drivers/net/wireless/iwlwifi/iwl-core.h |    6 +-----
 drivers/net/wireless/iwlwifi/iwl-rx.c   |    4 ++--
 6 files changed, 9 insertions(+), 25 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index a558df9..7795855 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -183,9 +183,7 @@ static struct iwl_lib_ops iwl1000_lib = {
 			EEPROM_REGULATORY_BAND_NO_HT40,
 		},
 	},
-	.temp_ops = {
-		.temperature = iwlagn_temperature,
-	 },
+	.temperature = iwlagn_temperature,
 };
 
 static const struct iwl_ops iwl1000_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index 2855994..b2b054f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -184,9 +184,7 @@ static struct iwl_lib_ops iwl2000_lib = {
 		},
 		.update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
 	},
-	.temp_ops = {
-		.temperature = iwlagn_temperature,
-	},
+	.temperature = iwlagn_temperature,
 };
 
 static const struct iwl_ops iwl2000_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 55972cf..30c2df6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -336,9 +336,7 @@ static struct iwl_lib_ops iwl5000_lib = {
 			EEPROM_REG_BAND_52_HT40_CHANNELS
 		},
 	},
-	.temp_ops = {
-		.temperature = iwlagn_temperature,
-	 },
+	.temperature = iwlagn_temperature,
 };
 
 static struct iwl_lib_ops iwl5150_lib = {
@@ -359,9 +357,7 @@ static struct iwl_lib_ops iwl5150_lib = {
 			EEPROM_REG_BAND_52_HT40_CHANNELS
 		},
 	},
-	.temp_ops = {
-		.temperature = iwl5150_temperature,
-	 },
+	.temperature = iwl5150_temperature,
 };
 
 static const struct iwl_ops iwl5000_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 17dc337..57f3169 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -277,9 +277,7 @@ static struct iwl_lib_ops iwl6000_lib = {
 		},
 		.update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
 	},
-	.temp_ops = {
-		.temperature = iwlagn_temperature,
-	 },
+	.temperature = iwlagn_temperature,
 };
 
 static struct iwl_lib_ops iwl6030_lib = {
@@ -302,9 +300,7 @@ static struct iwl_lib_ops iwl6030_lib = {
 		},
 		.update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
 	},
-	.temp_ops = {
-		.temperature = iwlagn_temperature,
-	 },
+	.temperature = iwlagn_temperature,
 };
 
 static struct iwl_nic_ops iwl6050_nic_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 47cfbb9..2e3ea55 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -96,10 +96,6 @@ struct iwl_hcmd_utils_ops {
 	int (*request_scan)(struct iwl_priv *priv, struct ieee80211_vif *vif);
 };
 
-struct iwl_temp_ops {
-	void (*temperature)(struct iwl_priv *priv);
-};
-
 struct iwl_lib_ops {
 	/* set hw dependent parameters */
 	int (*set_hw_params)(struct iwl_priv *priv);
@@ -120,7 +116,7 @@ struct iwl_lib_ops {
 	struct iwl_eeprom_ops eeprom_ops;
 
 	/* temperature */
-	struct iwl_temp_ops temp_ops;
+	void (*temperature)(struct iwl_priv *priv);
 };
 
 /* NIC specific ops */
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index 87148bb..1690b49 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -624,8 +624,8 @@ static void iwl_rx_statistics(struct iwl_priv *priv,
 		iwl_rx_calc_noise(priv);
 		queue_work(priv->workqueue, &priv->run_time_calib_work);
 	}
-	if (priv->cfg->ops->lib->temp_ops.temperature && change)
-		priv->cfg->ops->lib->temp_ops.temperature(priv);
+	if (priv->cfg->ops->lib->temperature && change)
+		priv->cfg->ops->lib->temperature(priv);
 }
 
 static void iwl_rx_reply_statistics(struct iwl_priv *priv,
-- 
1.7.0.4


  parent reply	other threads:[~2011-07-08 16:20 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08 15:46 [PATCH 00/21] update for 3.1 Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 01/21] iwlagn: remove the CMD_MAPPED flag Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 02/21] iwlagn: add an API to free the TX context Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 03/21] iwlagn: add an API for RX stop Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 04/21] iwlagn: add an API for TX stop Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 05/21] iwlagn: remove code duplication Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 06/21] iwlagn: consolidate the API that sends host commands and move to transport Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 07/21] iwlagn: remove the indirection for the dma channel num Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 08/21] iwlagn: provide heplers to access the transport ops Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 09/21] iwlagn: remove the indirection for update_chain_flags Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 10/21] iwlagn: remove the indirection for iwl_apm_init Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 11/21] iwlagn: remove indirection for eeprom_query_addr Wey-Yi Guy
2011-07-08 15:46 ` Wey-Yi Guy [this message]
2011-07-08 15:46 ` [PATCH 13/21] iwlagn: use bt handler for 2030 and 135 series devices Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 14/21] mac80211: add driver RSSI threshold events Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 15/21] iwlagn: Enable/disable PS poll based on RSSI and BT coex traffic state Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 16/21] iwlagn: declare static Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 17/21] iwlagn: add CMD_ON_DEMAND flag for host command from testmode Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 18/21] iwlagn: allow application own the uCode operation Wey-Yi Guy
2011-07-11 17:37   ` Johannes Berg
2011-07-11 17:15     ` Guy, Wey-Yi
2011-07-08 15:46 ` [PATCH 19/21] iwlagn: block regular host commands if driver don't own uCode Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 20/21] iwlagn: separate and enhance the fixed rate from Wey-Yi Guy
2011-07-08 15:46 ` [PATCH 21/21] iwlagn: remove iwlagn_hcmd_utils structure and call directly Wey-Yi Guy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1310139989-27661-13-git-send-email-wey-yi.w.guy@intel.com \
    --to=wey-yi.w.guy@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.