summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-06-15 12:26:55 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2006-06-30 22:09:13 +0200
commita2bcce8ede4fbda0c2a5f2132115715dff056b9c (patch)
treec111990b9d4fe86a5b358b235bdc6c51e3aaf199 /drivers/char
parent1da9ab7389b8a0789a1b3ad43d3efe80b4c57c03 (diff)
[PATCH] kill open-coded offsetof in cm4000_cs.c ZERO_DEV()
... to make sure that it doesn't break again when a field changes (see "[PATCH] pcmcia: fix zeroing of cm4000_cs.c data" for recent example). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index eab5394da666..31c8a21f9d87 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -149,12 +149,7 @@ struct cm4000_dev {
#define ZERO_DEV(dev) \
memset(&dev->atr_csum,0, \
sizeof(struct cm4000_dev) - \
- /*link*/ sizeof(struct pcmcia_device *) - \
- /*node*/ sizeof(dev_node_t) - \
- /*atr*/ MAX_ATR*sizeof(char) - \
- /*rbuf*/ 512*sizeof(char) - \
- /*sbuf*/ 512*sizeof(char) - \
- /*queue*/ 4*sizeof(wait_queue_head_t))
+ offsetof(struct cm4000_dev, atr_csum))
static struct pcmcia_device *dev_table[CM4000_MAX_DEV];
static struct class *cmm_class;