diff options
author | Greg Dietsche <Gregory.Dietsche@cuw.edu> | 2011-09-06 20:11:35 -0400 |
---|---|---|
committer | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-11-16 06:55:12 -0500 |
commit | 9b5e2f463ac6f53789bd5ce43d2bb4b4c01e8607 (patch) | |
tree | 0af5258b4c9464212bd582cef773c5e6f43233ce /drivers | |
parent | e3a2c775336641663b1c38dfa7dd8a1c1210ae23 (diff) |
iwlegacy: debugfs_ops should depend on CONFIG_IWLEGACY_DEBUGFS
Only setup structs related to debugfs_ops when CONFIG_IWLEGACY_DEBUGFS is set.
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlegacy/3945.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/3945.h | 21 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965.h | 21 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.h | 4 |
5 files changed, 8 insertions, 42 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c index 7367dbb75ec6..863664f9ba8b 100644 --- a/drivers/net/wireless/iwlegacy/3945.c +++ b/drivers/net/wireless/iwlegacy/3945.c | |||
@@ -2671,11 +2671,13 @@ static struct il_lib_ops il3945_lib = { | |||
2671 | .send_tx_power = il3945_send_tx_power, | 2671 | .send_tx_power = il3945_send_tx_power, |
2672 | .is_valid_rtc_data_addr = il3945_hw_valid_rtc_data_addr, | 2672 | .is_valid_rtc_data_addr = il3945_hw_valid_rtc_data_addr, |
2673 | 2673 | ||
2674 | #ifdef CONFIG_IWLEGACY_DEBUGFS | ||
2674 | .debugfs_ops = { | 2675 | .debugfs_ops = { |
2675 | .rx_stats_read = il3945_ucode_rx_stats_read, | 2676 | .rx_stats_read = il3945_ucode_rx_stats_read, |
2676 | .tx_stats_read = il3945_ucode_tx_stats_read, | 2677 | .tx_stats_read = il3945_ucode_tx_stats_read, |
2677 | .general_stats_read = il3945_ucode_general_stats_read, | 2678 | .general_stats_read = il3945_ucode_general_stats_read, |
2678 | }, | 2679 | }, |
2680 | #endif | ||
2679 | }; | 2681 | }; |
2680 | 2682 | ||
2681 | static const struct il_legacy_ops il3945_legacy_ops = { | 2683 | static const struct il_legacy_ops il3945_legacy_ops = { |
diff --git a/drivers/net/wireless/iwlegacy/3945.h b/drivers/net/wireless/iwlegacy/3945.h index 00d3336fd16b..2b2895c544d7 100644 --- a/drivers/net/wireless/iwlegacy/3945.h +++ b/drivers/net/wireless/iwlegacy/3945.h | |||
@@ -621,27 +621,6 @@ ssize_t il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf, | |||
621 | ssize_t il3945_ucode_general_stats_read(struct file *file, | 621 | ssize_t il3945_ucode_general_stats_read(struct file *file, |
622 | char __user *user_buf, size_t count, | 622 | char __user *user_buf, size_t count, |
623 | loff_t *ppos); | 623 | loff_t *ppos); |
624 | #else | ||
625 | static ssize_t | ||
626 | il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf, | ||
627 | size_t count, loff_t *ppos) | ||
628 | { | ||
629 | return 0; | ||
630 | } | ||
631 | |||
632 | static ssize_t | ||
633 | il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf, | ||
634 | size_t count, loff_t *ppos) | ||
635 | { | ||
636 | return 0; | ||
637 | } | ||
638 | |||
639 | static ssize_t | ||
640 | il3945_ucode_general_stats_read(struct file *file, char __user *user_buf, | ||
641 | size_t count, loff_t *ppos) | ||
642 | { | ||
643 | return 0; | ||
644 | } | ||
645 | #endif | 624 | #endif |
646 | 625 | ||
647 | #endif | 626 | #endif |
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c index ac80a0069124..84c54dccf195 100644 --- a/drivers/net/wireless/iwlegacy/4965.c +++ b/drivers/net/wireless/iwlegacy/4965.c | |||
@@ -2333,11 +2333,13 @@ static struct il_lib_ops il4965_lib = { | |||
2333 | .temp_ops = { | 2333 | .temp_ops = { |
2334 | .temperature = il4965_temperature_calib, | 2334 | .temperature = il4965_temperature_calib, |
2335 | }, | 2335 | }, |
2336 | #ifdef CONFIG_IWLEGACY_DEBUGFS | ||
2336 | .debugfs_ops = { | 2337 | .debugfs_ops = { |
2337 | .rx_stats_read = il4965_ucode_rx_stats_read, | 2338 | .rx_stats_read = il4965_ucode_rx_stats_read, |
2338 | .tx_stats_read = il4965_ucode_tx_stats_read, | 2339 | .tx_stats_read = il4965_ucode_tx_stats_read, |
2339 | .general_stats_read = il4965_ucode_general_stats_read, | 2340 | .general_stats_read = il4965_ucode_general_stats_read, |
2340 | }, | 2341 | }, |
2342 | #endif | ||
2341 | }; | 2343 | }; |
2342 | 2344 | ||
2343 | static const struct il_legacy_ops il4965_legacy_ops = { | 2345 | static const struct il_legacy_ops il4965_legacy_ops = { |
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h index ded8b922a44e..74472314bc37 100644 --- a/drivers/net/wireless/iwlegacy/4965.h +++ b/drivers/net/wireless/iwlegacy/4965.h | |||
@@ -956,27 +956,6 @@ ssize_t il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf, | |||
956 | ssize_t il4965_ucode_general_stats_read(struct file *file, | 956 | ssize_t il4965_ucode_general_stats_read(struct file *file, |
957 | char __user *user_buf, size_t count, | 957 | char __user *user_buf, size_t count, |
958 | loff_t *ppos); | 958 | loff_t *ppos); |
959 | #else | ||
960 | static ssize_t | ||
961 | il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf, | ||
962 | size_t count, loff_t *ppos) | ||
963 | { | ||
964 | return 0; | ||
965 | } | ||
966 | |||
967 | static ssize_t | ||
968 | il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf, | ||
969 | size_t count, loff_t *ppos) | ||
970 | { | ||
971 | return 0; | ||
972 | } | ||
973 | |||
974 | static ssize_t | ||
975 | il4965_ucode_general_stats_read(struct file *file, char __user *user_buf, | ||
976 | size_t count, loff_t *ppos) | ||
977 | { | ||
978 | return 0; | ||
979 | } | ||
980 | #endif | 959 | #endif |
981 | 960 | ||
982 | /****************************/ | 961 | /****************************/ |
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h index d0975ab8b908..1bc0b02f559c 100644 --- a/drivers/net/wireless/iwlegacy/common.h +++ b/drivers/net/wireless/iwlegacy/common.h | |||
@@ -1631,6 +1631,7 @@ struct il_apm_ops { | |||
1631 | void (*config) (struct il_priv *il); | 1631 | void (*config) (struct il_priv *il); |
1632 | }; | 1632 | }; |
1633 | 1633 | ||
1634 | #ifdef CONFIG_IWLEGACY_DEBUGFS | ||
1634 | struct il_debugfs_ops { | 1635 | struct il_debugfs_ops { |
1635 | ssize_t(*rx_stats_read) (struct file *file, char __user *user_buf, | 1636 | ssize_t(*rx_stats_read) (struct file *file, char __user *user_buf, |
1636 | size_t count, loff_t *ppos); | 1637 | size_t count, loff_t *ppos); |
@@ -1640,6 +1641,7 @@ struct il_debugfs_ops { | |||
1640 | char __user *user_buf, size_t count, | 1641 | char __user *user_buf, size_t count, |
1641 | loff_t *ppos); | 1642 | loff_t *ppos); |
1642 | }; | 1643 | }; |
1644 | #endif | ||
1643 | 1645 | ||
1644 | struct il_temp_ops { | 1646 | struct il_temp_ops { |
1645 | void (*temperature) (struct il_priv *il); | 1647 | void (*temperature) (struct il_priv *il); |
@@ -1683,7 +1685,9 @@ struct il_lib_ops { | |||
1683 | /* temperature */ | 1685 | /* temperature */ |
1684 | struct il_temp_ops temp_ops; | 1686 | struct il_temp_ops temp_ops; |
1685 | 1687 | ||
1688 | #ifdef CONFIG_IWLEGACY_DEBUGFS | ||
1686 | struct il_debugfs_ops debugfs_ops; | 1689 | struct il_debugfs_ops debugfs_ops; |
1690 | #endif | ||
1687 | 1691 | ||
1688 | }; | 1692 | }; |
1689 | 1693 | ||