ath9k_hw: clean up register write buffering
Throughout the code, DISABLE_REGWRITE_BUFFER is always called right after REGWRITE_BUFFER_FLUSH. Since that's unlikely to change any time soon, that makes keeping those ops separate rather pointless, as it only increases code size and line number counts. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
9dbebc7fd0
commit
435c1610f4
@@ -380,15 +380,6 @@ static void ath9k_enable_regwrite_buffer(void *hw_priv)
|
||||
atomic_inc(&priv->wmi->mwrite_cnt);
|
||||
}
|
||||
|
||||
static void ath9k_disable_regwrite_buffer(void *hw_priv)
|
||||
{
|
||||
struct ath_hw *ah = (struct ath_hw *) hw_priv;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv;
|
||||
|
||||
atomic_dec(&priv->wmi->mwrite_cnt);
|
||||
}
|
||||
|
||||
static void ath9k_regwrite_flush(void *hw_priv)
|
||||
{
|
||||
struct ath_hw *ah = (struct ath_hw *) hw_priv;
|
||||
@@ -397,6 +388,8 @@ static void ath9k_regwrite_flush(void *hw_priv)
|
||||
u32 rsp_status;
|
||||
int r;
|
||||
|
||||
atomic_dec(&priv->wmi->mwrite_cnt);
|
||||
|
||||
mutex_lock(&priv->wmi->multi_write_mutex);
|
||||
|
||||
if (priv->wmi->multi_write_idx) {
|
||||
@@ -420,7 +413,6 @@ static const struct ath_ops ath9k_common_ops = {
|
||||
.read = ath9k_regread,
|
||||
.write = ath9k_regwrite,
|
||||
.enable_write_buffer = ath9k_enable_regwrite_buffer,
|
||||
.disable_write_buffer = ath9k_disable_regwrite_buffer,
|
||||
.write_flush = ath9k_regwrite_flush,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user