diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-05-31 01:52:10 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-06-18 11:06:24 -0400 |
commit | 3599d39a8525b01540e2c7ec8c5d0df0dd11d6cf (patch) | |
tree | fb9c0b512ac042c1b483d6ff754cd1fd8af5e135 /drivers/net/wireless/iwlwifi/iwl-dev.h | |
parent | a48709c5d076aa3a3f9b6426f462abe6bf432b11 (diff) |
iwlagn: add get_dev to iwl_bus_ops
Bus specific layer must know how to return the struct device* of the device.
Implement that as a callback of iwl_bus_ops and use that callback instead of
using the priv->pdev pointer which is meant to disappear soon.
Since the struct device * is needed in hot path, iwl_bus holds a pointer to it
instead of calling get_dev all the time.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 8865514226b9..49e6c68f9b75 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1194,9 +1194,11 @@ struct iwl_bus; | |||
1194 | /** | 1194 | /** |
1195 | * struct iwl_bus_ops - bus specific operations | 1195 | * struct iwl_bus_ops - bus specific operations |
1196 | * @set_drv_data: set the priv pointer to the bus layer | 1196 | * @set_drv_data: set the priv pointer to the bus layer |
1197 | * @get_dev: returns the device struct | ||
1197 | */ | 1198 | */ |
1198 | struct iwl_bus_ops { | 1199 | struct iwl_bus_ops { |
1199 | void (*set_drv_data)(struct iwl_bus *bus, void *priv); | 1200 | void (*set_drv_data)(struct iwl_bus *bus, void *priv); |
1201 | struct device *(*get_dev)(const struct iwl_bus *bus); | ||
1200 | }; | 1202 | }; |
1201 | 1203 | ||
1202 | struct iwl_bus { | 1204 | struct iwl_bus { |
@@ -1205,6 +1207,7 @@ struct iwl_bus { | |||
1205 | 1207 | ||
1206 | /* Common data to all buses */ | 1208 | /* Common data to all buses */ |
1207 | struct iwl_priv *priv; /* driver's context */ | 1209 | struct iwl_priv *priv; /* driver's context */ |
1210 | struct device *dev; | ||
1208 | struct iwl_bus_ops *ops; | 1211 | struct iwl_bus_ops *ops; |
1209 | }; | 1212 | }; |
1210 | 1213 | ||