mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harald Welte <laforge@gnumonks.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Omnikey CardMan 4000 update
Date: Sun, 18 Sep 2005 23:22:18 +0200	[thread overview]
Message-ID: <20050918212217.GA18339@sunbeam.de.gnumonks.org> (raw)
In-Reply-To: <20050914022314.35eab48d.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 2142 bytes --]

On Wed, Sep 14, 2005 at 02:23:14AM -0700, Andrew Morton wrote:
> Harald Welte <laforge@gnumonks.org> wrote:
> >
> > Add new Omnikey Cardman 4000 smartcard reader driver
> 
> - All the open-coded mdelays() are wrong:
> 
>   #define	T_10MSEC	msecs_to_jiffies(10)
>   ...
> 		mdelay(T_10MSEC);
> 
>   mdelay() already takes a jiffies argument.
> 
> - terminate_monitor() should use del_timer_sync().
> 

Plaease see the patch below (against -rc1-mm1):

[CM4000] CardMan 4000 Driver Update

* use milliseconds as parameter for mdelay, not jiffies
* clarify that dev->mdelay parameter is in jiffies
* use del_timer_sync() instead of del_timer()

Signed-off-by: Harald Welte <laforge@gnumonks.org>

--- a/drivers/char/pcmcia/cm4000_cs.c	2005-09-18 18:56:29.000000000 +0200
+++ b/drivers/char/pcmcia/cm4000_cs.c	2005-09-18 21:39:31.000000000 +0200
@@ -131,7 +131,7 @@
 	unsigned char cwarn;	/* slow down warning */
 	unsigned char flags0;	/* cardman IO-flags 0 */
 	unsigned char flags1;	/* cardman IO-flags 1 */
-	unsigned int mdelay;	/* variable monitor speeds */
+	unsigned int mdelay;	/* variable monitor speeds, in jiffies */
 
 	unsigned int baudv;	/* baud value for speed */
 	unsigned char ta1;
@@ -564,7 +564,7 @@
 			DEBUGP(5, dev, "NumRecBytes is valid\n");
 			break;
 		}
-		mdelay(T_10MSEC);
+		mdelay(10);
 	}
 	if (i == 100) {
 		DEBUGP(5, dev, "Timeout waiting for NumRecBytes getting "
@@ -580,7 +580,7 @@
 			DEBUGP(2, dev, "NumRecBytes = %i\n", num_bytes_read);
 			break;
 		}
-		mdelay(T_10MSEC);
+		mdelay(10);
 	}
 
 	/* check whether it is a short PTS reply? */
@@ -678,7 +678,7 @@
 		msleep(25);
 
 	DEBUGP(5, dev, "Delete timer\n");
-	del_timer(&dev->timer);
+	del_timer_sync(&dev->timer);
 #ifdef PCMCIA_DEBUG
 	dev->monitor_running = 0;
 #endif
-- 
- Harald Welte <laforge@gnumonks.org>          	        http://gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      parent reply	other threads:[~2005-09-18 21:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13 15:53 [PATCH 2/2] New Omnikey Cardman 4000 driver Harald Welte
2005-09-14  9:23 ` Andrew Morton
2005-09-14 11:20   ` Stefan Smietanowski
2005-09-14 11:42     ` Arjan van de Ven
2005-09-18 21:22   ` Harald Welte [this message]

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=20050918212217.GA18339@sunbeam.de.gnumonks.org \
    --to=laforge@gnumonks.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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®