Commit d4fb39fd authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] bring telephony in line with 2.4

Also note the pcmcia fix - I think the other pcmcia cards should be
using del_timer_sync, but seem not to be.
parent cc805359
......@@ -274,8 +274,8 @@ static char ixj_c_revision[] = "$Revision: 4.7 $";
#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 @@ static inline void ixj_fsk_alloc(IXJ *j)
#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 @@ static void ulaw2alaw(unsigned char *buff, unsigned long len)
};
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 @@ static void alaw2ulaw(unsigned char *buff, unsigned long len)
};
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 @@ static int ixj_build_cadence(IXJ *j, IXJ_CADENCE * cp)
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 @@ static int ixj_ioctl(struct inode *inode, struct file *file_p, unsigned int cmd,
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));
......
......@@ -1199,7 +1199,7 @@ typedef struct {
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;
......
......@@ -98,7 +98,6 @@ static dev_link_t *ixj_attach(void)
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 @@ static void ixj_detach(dev_link_t * link)
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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment