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>
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index d0975ab..1bc0b02 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -1631,6 +1631,7 @@
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);
@@ -1640,6 +1641,7 @@
char __user *user_buf, size_t count,
loff_t *ppos);
};
+#endif
struct il_temp_ops {
void (*temperature) (struct il_priv *il);
@@ -1683,7 +1685,9 @@
/* temperature */
struct il_temp_ops temp_ops;
+#ifdef CONFIG_IWLEGACY_DEBUGFS
struct il_debugfs_ops debugfs_ops;
+#endif
};