summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/zd1211rw/zd_def.h
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2006-12-12 04:26:11 +0300
committerJeff Garzik <jeff@garzik.org>2007-02-06 00:58:42 +0300
commit0ce34bc8f7d906d66ce6803f63399ef9bbe54012 (patch)
tree1326f9105842fc81f89bf8ab1a435ab13a4d72d5 /drivers/net/wireless/zd1211rw/zd_def.h
parentee30276774451d657407855d95d9393ee8bc0bac (diff)
downloadlinux-0ce34bc8f7d906d66ce6803f63399ef9bbe54012.tar.xz
[PATCH] zd1211rw: Remove addressing abstraction
Instead of passing our own custom 32-bit addresses around and translating them, this patch makes all our register address constants absolute and removes the translation. There are two ugly parts: - fw_reg_addr() is needed to compute addresses of firmware registers, as this is dynamic based upon firmware - inc_addr() needs a small hack to handle byte vs word addressing However, both of those are only small, and we don't use fw_regs a whole lot anyway. The bonuses here include simplicity and improved driver readability. Also, the fact that registers are now referenced by 16-bit absolute addresses (as opposed to 32-bit pseudo addresses) means that over 2kb compiled code size has been shaved off. Includes some touchups and sparse fixes from Ulrich Kunitz. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_def.h')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_def.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_def.h b/drivers/net/wireless/zd1211rw/zd_def.h
index fb22f62cf1f3..deb99d1eaa77 100644
--- a/drivers/net/wireless/zd1211rw/zd_def.h
+++ b/drivers/net/wireless/zd1211rw/zd_def.h
@@ -23,6 +23,8 @@
#include <linux/device.h>
#include <linux/kernel.h>
+typedef u16 __nocast zd_addr_t;
+
#define dev_printk_f(level, dev, fmt, args...) \
dev_printk(level, dev, "%s() " fmt, __func__, ##args)