X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fisdn%2Fhysdn%2Fhysdn_init.c;h=9e01748a176e95c2726c2842ff102bca5fd3c4eb;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=5cac2bf5f4b06f98030455666e6a018afb2f3f7d;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/isdn/hysdn/hysdn_init.c b/drivers/isdn/hysdn/hysdn_init.c index 5cac2bf5f..9e01748a1 100644 --- a/drivers/isdn/hysdn/hysdn_init.c +++ b/drivers/isdn/hysdn/hysdn_init.c @@ -10,10 +10,8 @@ * */ -#include #include #include -#include #include #include #include @@ -34,7 +32,7 @@ MODULE_AUTHOR("Werner Cornelius"); MODULE_LICENSE("GPL"); static char *hysdn_init_revision = "$Revision: 1.6.6.6 $"; -int cardmax; /* number of found cards */ +static int cardmax; /* number of found cards */ hysdn_card *card_root = NULL; /* pointer to first card */ /**********************************************/ @@ -42,8 +40,8 @@ hysdn_card *card_root = NULL; /* pointer to first card */ /* the last entry contains all 0 */ /**********************************************/ static struct { - word subid; /* PCI sub id */ - uchar cardtyp; /* card type assigned */ + unsigned short subid; /* PCI sub id */ + unsigned char cardtyp; /* card type assigned */ } pci_subid_map[] = { { @@ -83,11 +81,10 @@ search_cards(void) if (pci_enable_device(akt_pcidev)) continue; - if (!(card = kmalloc(sizeof(hysdn_card), GFP_KERNEL))) { + if (!(card = kzalloc(sizeof(hysdn_card), GFP_KERNEL))) { printk(KERN_ERR "HYSDN: unable to alloc device mem \n"); return; } - memset(card, 0, sizeof(hysdn_card)); card->myid = cardmax; /* set own id */ card->bus = akt_pcidev->bus->number; card->devfn = akt_pcidev->devfn; /* slot + function */