From: Andrew Morton <[email-masked]>

- Work around gcc-2.95.x macro expansion bug

- unneded void* cast

- use kzalloc()

Cc: Harald Welte <[email-masked]>
Cc: Dominik Brodowski <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/char/pcmcia/cm4040_cs.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff -puN drivers/char/pcmcia/cm4040_cs.c~new-omnikey-cardman-4040-driver-fixes drivers/char/pcmcia/cm4040_cs.c
--- devel/drivers/char/pcmcia/cm4040_cs.c~new-omnikey-cardman-4040-driver-fixes	2005-09-14 02:23:57.000000000 -0700
+++ devel-akpm/drivers/char/pcmcia/cm4040_cs.c	2005-09-14 02:23:57.000000000 -0700
@@ -46,7 +46,7 @@ module_param(pc_debug, int, 0600);
 #define DEBUGP(n, rdr, x, args...) do { 				\
 	if (pc_debug >= (n)) 						\
 		dev_printk(KERN_DEBUG, reader_to_dev(rdr), "%s:" x, 	\
-			   __FUNCTION__, ##args); 			\
+			   __FUNCTION__ , ##args); 			\
 	} while (0)
 #else
 #define DEBUGP(n, rdr, x, args...)
@@ -453,7 +453,7 @@ static int cm4040_open(struct inode *ino
 	if (link->open)
 		return -EBUSY;
 
-	dev = (struct reader_dev *)link->priv;
+	dev = link->priv;
 	filp->private_data = dev;
 
 	if (filp->f_flags & O_NONBLOCK) {
@@ -705,11 +705,10 @@ static dev_link_t *reader_attach(void)
 	if (i == CM_MAX_DEV)
 		return NULL;
 
-	dev = kmalloc(sizeof(struct reader_dev), GFP_KERNEL);
+	dev = kzalloc(sizeof(struct reader_dev), GFP_KERNEL);
 	if (dev == NULL)
 		return NULL;
 
-	memset(dev, 0, sizeof(struct reader_dev));
 	dev->timeout = CCID_DRIVER_MINIMUM_TIMEOUT;
 	dev->buffer_status = 0;
 
_