From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] rt2x00: Move rt2x00debug include file
Date: Mon, 5 Mar 2007 19:53:18 +0100 [thread overview]
Message-ID: <200703051953.18515.IvDoorn@gmail.com> (raw)
In-Reply-To: <200703051920.25011.IvDoorn@gmail.com>
Now that we are working on rt2x00debug anyway,
lets remove the #if statements about RT2X00_DEBUGFS
from rt2x00.h and completely handle it in the drivers.
This will remove the ugly define CONFIG_RT2X00_DEBUGFS hack
And the rt2x00_dev structure is only increased slightly because
of the void* pointer.
The rt2x00_debugfs.h needs to be included inside the drivers.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
diff --git a/drivers/net/wireless/mac80211/rt2x00/rt2400pci.c b/drivers/net/wireless/mac80211/rt2x00/rt2400pci.c
index 4f612a0..93da031 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/mac80211/rt2x00/rt2400pci.c
@@ -186,7 +186,9 @@ rf_write:
rt2x00_register_write(rt2x00dev, RFCSR, reg);
}
-#ifdef CONFIG_RT2X00_DEBUGFS
+#if defined(CONFIG_RT2X00_DEBUGFS) || defined(CONFIG_RT2X00_DEBUGFS_MODULE)
+#include "rt2x00debug.h"
+
#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
static void rt2400pci_read_csr(struct rt2x00_dev *rt2x00dev,
diff --git a/drivers/net/wireless/mac80211/rt2x00/rt2500pci.c b/drivers/net/wireless/mac80211/rt2x00/rt2500pci.c
index 46ca323..1e659aa 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/mac80211/rt2x00/rt2500pci.c
@@ -186,7 +186,9 @@ rf_write:
rt2x00_register_write(rt2x00dev, RFCSR, reg);
}
-#ifdef CONFIG_RT2X00_DEBUGFS
+#if defined(CONFIG_RT2X00_DEBUGFS) || defined(CONFIG_RT2X00_DEBUGFS_MODULE)
+#include "rt2x00debug.h"
+
#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
static void rt2500pci_read_csr(struct rt2x00_dev *rt2x00dev,
diff --git a/drivers/net/wireless/mac80211/rt2x00/rt2500usb.c b/drivers/net/wireless/mac80211/rt2x00/rt2500usb.c
index 8c2b955..b9eda8d 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/mac80211/rt2x00/rt2500usb.c
@@ -228,7 +228,9 @@ rf_write:
rt2x00_register_write(rt2x00dev, PHY_CSR10, reg);
}
-#ifdef CONFIG_RT2X00_DEBUGFS
+#if defined(CONFIG_RT2X00_DEBUGFS) || defined(CONFIG_RT2X00_DEBUGFS_MODULE)
+#include "rt2x00debug.h"
+
#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u16)) )
static void rt2500usb_read_csr(struct rt2x00_dev *rt2x00dev,
diff --git a/drivers/net/wireless/mac80211/rt2x00/rt2x00.h b/drivers/net/wireless/mac80211/rt2x00/rt2x00.h
index ea05d00..b64d7ee 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/mac80211/rt2x00/rt2x00.h
@@ -32,11 +32,6 @@
#include <linux/workqueue.h>
#include <net/mac80211.h>
-#if defined( CONFIG_RT2X00_DEBUGFS) || defined( CONFIG_RT2X00_DEBUGFS_MODULE)
-#define CONFIG_RT2X00_DEBUGFS
-#include "rt2x00debug.h"
-#endif /* CONFIG_RT2X00_DEBUGFS */
-
/*
* Module information.
*/
@@ -983,9 +978,7 @@ struct rt2x00_dev {
/*
* If enabled, the structure for the debugfs files.
*/
-#ifdef CONFIG_RT2X00_DEBUGFS
void *debugfs_data;
-#endif /* CONFIG_RT2X00_DEBUGFS */
/*
* Queue for deferred work.
diff --git a/drivers/net/wireless/mac80211/rt2x00/rt61pci.c b/drivers/net/wireless/mac80211/rt2x00/rt61pci.c
index 029b506..21278c6 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/mac80211/rt2x00/rt61pci.c
@@ -217,7 +217,9 @@ static void rt2x00_mcu_request(const struct rt2x00_dev *rt2x00dev,
rt2x00_register_write(rt2x00dev, HOST_CMD_CSR, reg);
}
-#ifdef CONFIG_RT2X00_DEBUGFS
+#if defined(CONFIG_RT2X00_DEBUGFS) || defined(CONFIG_RT2X00_DEBUGFS_MODULE)
+#include "rt2x00debug.h"
+
#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
static void rt61pci_read_csr(struct rt2x00_dev *rt2x00dev,
diff --git a/drivers/net/wireless/mac80211/rt2x00/rt73usb.c b/drivers/net/wireless/mac80211/rt2x00/rt73usb.c
index c27bdcc..9ede5fa 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/mac80211/rt2x00/rt73usb.c
@@ -224,7 +224,9 @@ rf_write:
rt2x00_register_write(rt2x00dev, PHY_CSR4, reg);
}
-#ifdef CONFIG_RT2X00_DEBUGFS
+#if defined(CONFIG_RT2X00_DEBUGFS) || defined(CONFIG_RT2X00_DEBUGFS_MODULE)
+#include "rt2x00debug.h"
+
#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
static void rt73usb_read_csr(struct rt2x00_dev *rt2x00dev,
prev parent reply other threads:[~2007-03-05 18:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-05 18:20 [PATCH] rt2x00: Make rt2x00debug structure interface independent Ivo van Doorn
2007-03-05 18:53 ` Ivo van Doorn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200703051953.18515.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).