linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: 2.5.40 bring telephony in line with 2.4
@ 2002-10-06 17:16 Alan Cox
  0 siblings, 0 replies; only message in thread
From: Alan Cox @ 2002-10-06 17:16 UTC (permalink / raw)
  To: torvalds, linux-kernel

Also note the pcmcia fix - I think the other pcmcia cards should be
using del_timer_sync, but seem not to be.

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.2.5.40/drivers/telephony/ixj.c linux.2.5.40-ac5/drivers/telephony/ixj.c
--- linux.2.5.40/drivers/telephony/ixj.c	2002-07-20 20:11:06.000000000 +0100
+++ linux.2.5.40-ac5/drivers/telephony/ixj.c	2002-10-03 17:01:27.000000000 +0100
@@ -274,8 +274,8 @@
 
 #include "ixj.h"
 
-#define TYPE(dev) (MINOR(dev) >> 4)
-#define NUM(dev) (MINOR(dev) & 0xf)
+#define TYPE(dev) (minor(dev) >> 4)
+#define NUM(dev) (minor(dev) & 0xf)
 
 static int ixjdebug;
 static int hertz = HZ;
@@ -386,7 +386,7 @@
 #ifdef PERFMON_STATS
 #define ixj_perfmon(x)	((x)++)
 #else
-#define ixj_perfmon(x)	do {} while(0);
+#define ixj_perfmon(x)	do { } while(0)
 #endif
 
 static int ixj_convert_loaded;
@@ -2806,7 +2806,10 @@
 	};
 
 	while (len--)
-		*buff++ = table_ulaw2alaw[*(unsigned char *)buff];
+	{
+		*buff = table_ulaw2alaw[*(unsigned char *)buff];
+		buff++;
+	}
 }
 
 static void alaw2ulaw(unsigned char *buff, unsigned long len)
@@ -2848,7 +2851,10 @@
 	};
 
         while (len--)
-                *buff++ = table_alaw2ulaw[*(unsigned char *)buff];
+        {
+                *buff = table_alaw2ulaw[*(unsigned char *)buff];
+                buff++;
+	}
 }
 
 static ssize_t ixj_read(struct file * file_p, char *buf, size_t length, loff_t * ppos)
@@ -5943,7 +5949,7 @@
 	lcp = kmalloc(sizeof(IXJ_CADENCE), GFP_KERNEL);
 	if (lcp == NULL)
 		return -ENOMEM;
-	if (copy_from_user(lcp, (char *) cp, sizeof(IXJ_CADENCE)) || (unsigned)lcp->elements_used >= ~0U/sizeof(IXJ_CADENCE) )
+	if (copy_from_user(lcp, (char *) cp, sizeof(IXJ_CADENCE)) || (unsigned)lcp->elements_used >= ~0U/sizeof(IXJ_CADENCE_ELEMENT) )
         {
                 kfree(lcp);
                 return -EFAULT;
@@ -6202,7 +6208,7 @@
 	IXJ_FILTER_RAW jfr;
 
 	unsigned int raise, mant;
-	unsigned int minor = MINOR(inode->i_rdev);
+	unsigned int minor = minor(inode->i_rdev);
 	int board = NUM(inode->i_rdev);
 
 	IXJ *j = get_ixj(NUM(inode->i_rdev));
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.2.5.40/drivers/telephony/ixj.h linux.2.5.40-ac5/drivers/telephony/ixj.h
--- linux.2.5.40/drivers/telephony/ixj.h	2002-07-20 20:12:29.000000000 +0100
+++ linux.2.5.40-ac5/drivers/telephony/ixj.h	2002-10-03 14:16:49.000000000 +0100
@@ -1199,7 +1199,7 @@
 	unsigned char cid_play_flag;
 	char play_mode;
 	IXJ_FLAGS flags;
-	unsigned int busyflags;
+	unsigned long busyflags;
 	unsigned int rec_frame_size;
 	unsigned int play_frame_size;
 	unsigned int cid_play_frame_size;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.2.5.40/drivers/telephony/ixj_pcmcia.c linux.2.5.40-ac5/drivers/telephony/ixj_pcmcia.c
--- linux.2.5.40/drivers/telephony/ixj_pcmcia.c	2002-07-20 20:12:17.000000000 +0100
+++ linux.2.5.40-ac5/drivers/telephony/ixj_pcmcia.c	2002-10-03 14:46:12.000000000 +0100
@@ -98,7 +98,6 @@
 static void ixj_detach(dev_link_t * link)
 {
 	dev_link_t **linkp;
-	long flags;
 	int ret;
 	DEBUG(0, "ixj_detach(0x%p)\n", link);
 	for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
@@ -106,13 +105,8 @@
 			break;
 	if (*linkp == NULL)
 		return;
-	save_flags(flags);
-	cli();
-	if (link->state & DEV_RELEASE_PENDING) {
-		del_timer(&link->release);
-		link->state &= ~DEV_RELEASE_PENDING;
-	}
-	restore_flags(flags);
+	del_timer_sync(&link->release);
+	link->state &= ~DEV_RELEASE_PENDING;
 	if (link->state & DEV_CONFIG)
 		ixj_cs_release((u_long) link);
 	if (link->handle) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-06 17:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-06 17:16 PATCH: 2.5.40 bring telephony in line with 2.4 Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).