summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/debug.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-03-07 10:26:41 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-03-16 18:09:36 -0400
commit2c91108c55477334f6854a587ec6e9111d8f1407 (patch)
treecea98b7ea31c0e37508fec8513b4a299409fa556 /drivers/net/wireless/ath5k/debug.c
parent77dcb6a9526b1e0d159a9300e512c7271bff3163 (diff)
ath5k: constify stuff
Make some structures const to place them in .rodata, since we won't change them. Most important parts of objdump -h: - 0 .text 00011170 + 0 .text 00011140 - 5 .rodata 0000828e + 5 .rodata 0000895e - 13 .data 00000560 + 13 .data 00000110 - 14 .devinit.data 00000260 Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Cc: Luis R. Rodriguez <lrodriguez@atheros.com> Cc: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/debug.c')
-rw-r--r--drivers/net/wireless/ath5k/debug.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/ath5k/debug.c
index 413ed689cd5..9770bb3d40f 100644
--- a/drivers/net/wireless/ath5k/debug.c
+++ b/drivers/net/wireless/ath5k/debug.c
@@ -82,14 +82,14 @@ static int ath5k_debugfs_open(struct inode *inode, struct file *file)
/* debugfs: registers */
struct reg {
- char *name;
+ const char *name;
int addr;
};
#define REG_STRUCT_INIT(r) { #r, r }
/* just a few random registers, might want to add more */
-static struct reg regs[] = {
+static const struct reg regs[] = {
REG_STRUCT_INIT(AR5K_CR),
REG_STRUCT_INIT(AR5K_RXDP),
REG_STRUCT_INIT(AR5K_CFG),
@@ -142,7 +142,7 @@ static struct reg regs[] = {
static void *reg_start(struct seq_file *seq, loff_t *pos)
{
- return *pos < ARRAY_SIZE(regs) ? &regs[*pos] : NULL;
+ return *pos < ARRAY_SIZE(regs) ? (void *)&regs[*pos] : NULL;
}
static void reg_stop(struct seq_file *seq, void *p)
@@ -153,7 +153,7 @@ static void reg_stop(struct seq_file *seq, void *p)
static void *reg_next(struct seq_file *seq, void *p, loff_t *pos)
{
++*pos;
- return *pos < ARRAY_SIZE(regs) ? &regs[*pos] : NULL;
+ return *pos < ARRAY_SIZE(regs) ? (void *)&regs[*pos] : NULL;
}
static int reg_show(struct seq_file *seq, void *p)
@@ -290,7 +290,7 @@ static const struct file_operations fops_reset = {
/* debugfs: debug level */
-static struct {
+static const struct {
enum ath5k_debug_level level;
const char *name;
const char *desc;