From: Andrew Morton <akpm@osdl.org>
To: Harald Welte <laforge@gnumonks.org>
Cc: nish.aravamudan@gmail.com, linux-kernel@vger.kernel.org,
torvalds@osdl.org
Subject: Re: [PATCH 1/2] New Omnikey Cardman 4040 driver
Date: Wed, 14 Sep 2005 02:19:43 -0700 [thread overview]
Message-ID: <20050914021943.681d8f05.akpm@osdl.org> (raw)
In-Reply-To: <20050913163951.GA29695@sunbeam.de.gnumonks.org>
Harald Welte <laforge@gnumonks.org> wrote:
>
> Add new Omnikey Cardman 4040 smartcard reader driver
>
I see a timer, but I see no del_timer_sync() anywhere. Cannot the timer be
left pending after device shutdown or rmmod?
Plus:
- Work around gcc-2.95.x macro expansion bug
- unneded void* cast
- use kzalloc()
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:05:46.000000000 -0700
+++ devel-akpm/drivers/char/pcmcia/cm4040_cs.c 2005-09-14 02:05:46.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;
_
next prev parent reply other threads:[~2005-09-14 9:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-13 15:51 Harald Welte
2005-09-13 16:02 ` Nish Aravamudan
2005-09-13 16:39 ` Harald Welte
2005-09-14 9:19 ` Andrew Morton [this message]
2005-09-18 21:23 ` Harald Welte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050914021943.681d8f05.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=laforge@gnumonks.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nish.aravamudan@gmail.com \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®