Clean up duplicate includes in drivers/net/
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / net / wireless / zd1211rw / zd_def.h
blob505b4d7dd0e29003f7ce2e825f469a5a895e77f1
1 /* zd_def.h
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 #ifndef _ZD_DEF_H
19 #define _ZD_DEF_H
21 #include <linux/kernel.h>
22 #include <linux/stringify.h>
23 #include <linux/device.h>
25 typedef u16 __nocast zd_addr_t;
27 #define dev_printk_f(level, dev, fmt, args...) \
28 dev_printk(level, dev, "%s() " fmt, __func__, ##args)
30 #ifdef DEBUG
31 # define dev_dbg_f(dev, fmt, args...) \
32 dev_printk_f(KERN_DEBUG, dev, fmt, ## args)
33 #else
34 # define dev_dbg_f(dev, fmt, args...) do { (void)(dev); } while (0)
35 #endif /* DEBUG */
37 #ifdef DEBUG
38 # define ZD_ASSERT(x) \
39 do { \
40 if (!(x)) { \
41 pr_debug("%s:%d ASSERT %s VIOLATED!\n", \
42 __FILE__, __LINE__, __stringify(x)); \
43 dump_stack(); \
44 } \
45 } while (0)
46 #else
47 # define ZD_ASSERT(x) do { } while (0)
48 #endif
50 #ifdef DEBUG
51 # define ZD_MEMCLEAR(pointer, size) memset((pointer), 0xff, (size))
52 #else
53 # define ZD_MEMCLEAR(pointer, size) do { } while (0)
54 #endif
56 #endif /* _ZD_DEF_H */