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>
.send_tx_power = il3945_send_tx_power,
.is_valid_rtc_data_addr = il3945_hw_valid_rtc_data_addr,
+#ifdef CONFIG_IWLEGACY_DEBUGFS
.debugfs_ops = {
.rx_stats_read = il3945_ucode_rx_stats_read,
.tx_stats_read = il3945_ucode_tx_stats_read,
.general_stats_read = il3945_ucode_general_stats_read,
},
+#endif
};
static const struct il_legacy_ops il3945_legacy_ops = {
ssize_t il3945_ucode_general_stats_read(struct file *file,
char __user *user_buf, size_t count,
loff_t *ppos);
-#else
-static ssize_t
-il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
- size_t count, loff_t *ppos)
-{
- return 0;
-}
-
-static ssize_t
-il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
- size_t count, loff_t *ppos)
-{
- return 0;
-}
-
-static ssize_t
-il3945_ucode_general_stats_read(struct file *file, char __user *user_buf,
- size_t count, loff_t *ppos)
-{
- return 0;
-}
#endif
#endif
.temp_ops = {
.temperature = il4965_temperature_calib,
},
+#ifdef CONFIG_IWLEGACY_DEBUGFS
.debugfs_ops = {
.rx_stats_read = il4965_ucode_rx_stats_read,
.tx_stats_read = il4965_ucode_tx_stats_read,
.general_stats_read = il4965_ucode_general_stats_read,
},
+#endif
};
static const struct il_legacy_ops il4965_legacy_ops = {
ssize_t il4965_ucode_general_stats_read(struct file *file,
char __user *user_buf, size_t count,
loff_t *ppos);
-#else
-static ssize_t
-il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
- size_t count, loff_t *ppos)
-{
- return 0;
-}
-
-static ssize_t
-il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf,
- size_t count, loff_t *ppos)
-{
- return 0;
-}
-
-static ssize_t
-il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
- size_t count, loff_t *ppos)
-{
- return 0;
-}
#endif
/****************************/
void (*config) (struct il_priv *il);
};
+#ifdef CONFIG_IWLEGACY_DEBUGFS
struct il_debugfs_ops {
ssize_t(*rx_stats_read) (struct file *file, char __user *user_buf,
size_t count, loff_t *ppos);
char __user *user_buf, size_t count,
loff_t *ppos);
};
+#endif
struct il_temp_ops {
void (*temperature) (struct il_priv *il);
/* temperature */
struct il_temp_ops temp_ops;
+#ifdef CONFIG_IWLEGACY_DEBUGFS
struct il_debugfs_ops debugfs_ops;
+#endif
};