diff options
author | Zhu, Yi <yi.zhu@intel.com> | 2008-12-05 10:58:40 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-12 13:48:21 -0500 |
commit | 73d7b5acc461bdc99e0135779d15e1874c6e00a6 (patch) | |
tree | 30c62a728e57cc83f938a2a69a0188d624c42793 /drivers/net/wireless/iwlwifi/iwl-4965.c | |
parent | 42802d71dd14dd0e435a8da59d817d0c6f8a2866 (diff) |
iwlwifi: iwl_poll_{direct_}bit cleanup
The patch merges implementation of iwl_poll_bit() and
iwl_poll_direct_bit() by letting the latter be a special case of
the former.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index c961e2c716d..324825e810f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -352,9 +352,8 @@ static int iwl4965_apm_init(struct iwl_priv *priv) | |||
352 | iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); | 352 | iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); |
353 | 353 | ||
354 | /* wait for clock stabilization */ | 354 | /* wait for clock stabilization */ |
355 | ret = iwl_poll_bit(priv, CSR_GP_CNTRL, | 355 | ret = iwl_poll_direct_bit(priv, CSR_GP_CNTRL, |
356 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, | 356 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); |
357 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | ||
358 | if (ret < 0) { | 357 | if (ret < 0) { |
359 | IWL_DEBUG_INFO("Failed to init the card\n"); | 358 | IWL_DEBUG_INFO("Failed to init the card\n"); |
360 | goto out; | 359 | goto out; |
@@ -436,9 +435,8 @@ static int iwl4965_apm_stop_master(struct iwl_priv *priv) | |||
436 | /* set stop master bit */ | 435 | /* set stop master bit */ |
437 | iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER); | 436 | iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER); |
438 | 437 | ||
439 | ret = iwl_poll_bit(priv, CSR_RESET, | 438 | ret = iwl_poll_direct_bit(priv, CSR_RESET, |
440 | CSR_RESET_REG_FLAG_MASTER_DISABLED, | 439 | CSR_RESET_REG_FLAG_MASTER_DISABLED, 100); |
441 | CSR_RESET_REG_FLAG_MASTER_DISABLED, 100); | ||
442 | if (ret < 0) | 440 | if (ret < 0) |
443 | goto out; | 441 | goto out; |
444 | 442 | ||
@@ -482,10 +480,8 @@ static int iwl4965_apm_reset(struct iwl_priv *priv) | |||
482 | 480 | ||
483 | iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); | 481 | iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); |
484 | 482 | ||
485 | ret = iwl_poll_bit(priv, CSR_GP_CNTRL, | 483 | ret = iwl_poll_direct_bit(priv, CSR_GP_CNTRL, |
486 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, | 484 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); |
487 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | ||
488 | |||
489 | if (ret < 0) | 485 | if (ret < 0) |
490 | goto out; | 486 | goto out; |
491 | 487 | ||