fixes from 2.4.0-test11-pre3

This commit is contained in:
Kai Germaschewski 2000-11-12 15:29:37 +00:00
parent 8c6a396304
commit fa6653235e
3 changed files with 11 additions and 43 deletions

View File

@ -20,6 +20,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.12 2000/05/06 00:52:36 kai
* merged changes from kernel tree
* fixed timer and net_device->name breakage
*
* Revision 1.11 1999/10/30 09:48:04 keil
* miss one prefix act2000
*
@ -563,37 +567,6 @@ act2000_readstatus(u_char * buf, int len, int user, act2000_card * card)
return count;
}
static void
act2000_putmsg(act2000_card *card, char c)
{
ulong flags;
save_flags(flags);
cli();
*card->status_buf_write++ = c;
if (card->status_buf_write == card->status_buf_read) {
if (++card->status_buf_read > card->status_buf_end)
card->status_buf_read = card->status_buf;
}
if (card->status_buf_write > card->status_buf_end)
card->status_buf_write = card->status_buf;
restore_flags(flags);
}
static void
act2000_logstat(struct act2000_card *card, char *str)
{
char *p = str;
isdn_ctrl c;
while (*p)
act2000_putmsg(card, *p++);
c.command = ISDN_STAT_STAVAIL;
c.driver = card->myid;
c.arg = strlen(str);
card->interface.statcallb(&c);
}
/*
* Find card with given driverId
*/

View File

@ -122,11 +122,11 @@ int pcbit_init_dev(int board, int mem_base, int irq)
dev->b1 = kmalloc(sizeof(struct pcbit_chan), GFP_KERNEL);
if (!dev->b1) {
printk("pcbit_init: couldn't malloc pcbit_chan struct\n");
kfree(dev);
#ifdef COMPAT_HAS_ISA_IOREMAP
iounmap((unsigned char*)dev->sh_mem);
release_mem_region(dev->ph_mem, 4096);
#endif
kfree(dev);
return -ENOMEM;
}
@ -134,11 +134,11 @@ int pcbit_init_dev(int board, int mem_base, int irq)
if (!dev->b2) {
printk("pcbit_init: couldn't malloc pcbit_chan struct\n");
kfree(dev->b1);
kfree(dev);
#ifdef COMPAT_HAS_ISA_IOREMAP
iounmap((unsigned char*)dev->sh_mem);
release_mem_region(dev->ph_mem, 4096);
#endif
kfree(dev);
return -ENOMEM;
}
@ -160,11 +160,11 @@ int pcbit_init_dev(int board, int mem_base, int irq)
{
kfree(dev->b1);
kfree(dev->b2);
kfree(dev);
#ifdef COMPAT_HAS_ISA_IOREMAP
iounmap((unsigned char*)dev->sh_mem);
release_mem_region(dev->ph_mem, 4096);
#endif
kfree(dev);
dev_pcbit[board] = NULL;
return -EIO;
}
@ -184,11 +184,11 @@ int pcbit_init_dev(int board, int mem_base, int irq)
free_irq(irq, dev);
kfree(dev->b1);
kfree(dev->b2);
kfree(dev);
#ifdef COMPAT_HAS_ISA_IOREMAP
iounmap((unsigned char*)dev->sh_mem);
release_mem_region(dev->ph_mem, 4096);
#endif
kfree(dev);
dev_pcbit[board] = NULL;
return -EIO;
}
@ -217,11 +217,11 @@ int pcbit_init_dev(int board, int mem_base, int irq)
free_irq(irq, dev);
kfree(dev->b1);
kfree(dev->b2);
kfree(dev);
#ifdef COMPAT_HAS_ISA_IOREMAP
iounmap((unsigned char*)dev->sh_mem);
release_mem_region(dev->ph_mem, 4096);
#endif
kfree(dev);
dev_pcbit[board] = NULL;
return -EIO;
}
@ -257,11 +257,11 @@ void pcbit_terminate(int board)
del_timer(&dev->b2->fsm_timer);
kfree(dev->b1);
kfree(dev->b2);
kfree(dev);
#ifdef COMPAT_HAS_ISA_IOREMAP
iounmap((unsigned char*)dev->sh_mem);
release_mem_region(dev->ph_mem, 4096);
#endif
kfree(dev);
}
}
#endif

View File

@ -27,11 +27,6 @@
*/
#include <linux/kernel.h>
#define NULL 0x0
#define REQUEST_IRQ(a,b,c,d,e) request_irq(a,b,c,d,e)
#define FREE_IRQ(a,b) free_irq(a,b)
inline char *strcpy(char *, const char *);
int dbg_level = 0;
@ -61,7 +56,7 @@ inline char *strcpy(char *dest, const char *src)
*i = *j;
i++; j++;
}
*(++i) = NULL;
*(++i) = 0;
return dest;
}