aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2012-02-13 05:23:16 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-22 14:51:13 -0500
commita89268e8cdcd52680bda21ada05f2716c6466377 (patch)
treebd8ead31aa28ccb0e193c03535915185bdbf27ea /drivers/net/wireless/iwlegacy
parent527901d0aeb233a479123b7e5f542fbc911ccf6d (diff)
iwlegacy: merge eeprom_ops into lib_ops
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
-rw-r--r--drivers/net/wireless/iwlegacy/3945.c6
-rw-r--r--drivers/net/wireless/iwlegacy/4965.c6
-rw-r--r--drivers/net/wireless/iwlegacy/common.c4
-rw-r--r--drivers/net/wireless/iwlegacy/common.h8
4 files changed, 8 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index 4e63e7d48a7b..95d88b4f3106 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -2645,12 +2645,10 @@ static struct il_lib_ops il3945_lib = {
2645 .init = il3945_apm_init, 2645 .init = il3945_apm_init,
2646 .config = il3945_nic_config, 2646 .config = il3945_nic_config,
2647 }, 2647 },
2648 .eeprom_ops = {
2649 .acquire_semaphore = il3945_eeprom_acquire_semaphore,
2650 .release_semaphore = il3945_eeprom_release_semaphore,
2651 },
2652 .send_tx_power = il3945_send_tx_power, 2648 .send_tx_power = il3945_send_tx_power,
2653 .is_valid_rtc_data_addr = il3945_hw_valid_rtc_data_addr, 2649 .is_valid_rtc_data_addr = il3945_hw_valid_rtc_data_addr,
2650 .eeprom_acquire_semaphore = il3945_eeprom_acquire_semaphore,
2651 .eeprom_release_semaphore = il3945_eeprom_release_semaphore,
2654}; 2652};
2655 2653
2656static const struct il_legacy_ops il3945_legacy_ops = { 2654static const struct il_legacy_ops il3945_legacy_ops = {
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c
index 3a30aacf5d0c..3ddc31f0f9e7 100644
--- a/drivers/net/wireless/iwlegacy/4965.c
+++ b/drivers/net/wireless/iwlegacy/4965.c
@@ -1904,12 +1904,10 @@ static struct il_lib_ops il4965_lib = {
1904 .init = il_apm_init, 1904 .init = il_apm_init,
1905 .config = il4965_nic_config, 1905 .config = il4965_nic_config,
1906 }, 1906 },
1907 .eeprom_ops = {
1908 .acquire_semaphore = il4965_eeprom_acquire_semaphore,
1909 .release_semaphore = il4965_eeprom_release_semaphore,
1910 },
1911 .send_tx_power = il4965_send_tx_power, 1907 .send_tx_power = il4965_send_tx_power,
1912 .update_chain_flags = il4965_update_chain_flags, 1908 .update_chain_flags = il4965_update_chain_flags,
1909 .eeprom_acquire_semaphore = il4965_eeprom_acquire_semaphore,
1910 .eeprom_release_semaphore = il4965_eeprom_release_semaphore,
1913}; 1911};
1914 1912
1915static const struct il_legacy_ops il4965_legacy_ops = { 1913static const struct il_legacy_ops il4965_legacy_ops = {
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index 5a7ad52db1d9..5de2340d08c4 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -740,7 +740,7 @@ il_eeprom_init(struct il_priv *il)
740 } 740 }
741 741
742 /* Make sure driver (instead of uCode) is allowed to read EEPROM */ 742 /* Make sure driver (instead of uCode) is allowed to read EEPROM */
743 ret = il->ops->lib->eeprom_ops.acquire_semaphore(il); 743 ret = il->ops->lib->eeprom_acquire_semaphore(il);
744 if (ret < 0) { 744 if (ret < 0) {
745 IL_ERR("Failed to acquire EEPROM semaphore.\n"); 745 IL_ERR("Failed to acquire EEPROM semaphore.\n");
746 ret = -ENOENT; 746 ret = -ENOENT;
@@ -772,7 +772,7 @@ il_eeprom_init(struct il_priv *il)
772 772
773 ret = 0; 773 ret = 0;
774done: 774done:
775 il->ops->lib->eeprom_ops.release_semaphore(il); 775 il->ops->lib->eeprom_release_semaphore(il);
776 776
777err: 777err:
778 if (ret) 778 if (ret)
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index 6f42f56388e7..b588a5f4da03 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -425,11 +425,6 @@ struct il_eeprom_calib_info {
425 425
426#define EEPROM_REGULATORY_BAND_NO_HT40 (0) 426#define EEPROM_REGULATORY_BAND_NO_HT40 (0)
427 427
428struct il_eeprom_ops {
429 int (*acquire_semaphore) (struct il_priv *il);
430 void (*release_semaphore) (struct il_priv *il);
431};
432
433int il_eeprom_init(struct il_priv *il); 428int il_eeprom_init(struct il_priv *il);
434void il_eeprom_free(struct il_priv *il); 429void il_eeprom_free(struct il_priv *il);
435const u8 *il_eeprom_query_addr(const struct il_priv *il, size_t offset); 430const u8 *il_eeprom_query_addr(const struct il_priv *il, size_t offset);
@@ -1617,7 +1612,8 @@ struct il_lib_ops {
1617 void (*update_chain_flags) (struct il_priv *il); 1612 void (*update_chain_flags) (struct il_priv *il);
1618 1613
1619 /* eeprom operations */ 1614 /* eeprom operations */
1620 struct il_eeprom_ops eeprom_ops; 1615 int (*eeprom_acquire_semaphore) (struct il_priv *il);
1616 void (*eeprom_release_semaphore) (struct il_priv *il);
1621}; 1617};
1622 1618
1623struct il_led_ops { 1619struct il_led_ops {