Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[pandora-kernel.git] / drivers / net / wan / cosa.c
index 9ef49ce..1d706ea 100644 (file)
@@ -154,8 +154,8 @@ struct cosa_data {
        int nchannels;                  /* # of channels on this card */
        int driver_status;              /* For communicating with firmware */
        int firmware_status;            /* Downloaded, reseted, etc. */
-       long int rxbitmap, txbitmap;    /* Bitmap of channels who are willing to send/receive data */
-       long int rxtx;                  /* RX or TX in progress? */
+       unsigned long rxbitmap, txbitmap;/* Bitmap of channels who are willing to send/receive data */
+       unsigned long rxtx;             /* RX or TX in progress? */
        int enabled;
        int usage;                              /* usage count */
        int txchan, txsize, rxsize;
@@ -395,8 +395,7 @@ static int __init cosa_init(void)
                goto out_chrdev;
        }
        for (i=0; i<nr_cards; i++) {
-               class_device_create(cosa_class, NULL, MKDEV(cosa_major, i),
-                               NULL, "cosa%d", i);
+               device_create(cosa_class, NULL, MKDEV(cosa_major, i), "cosa%d", i);
        }
        err = 0;
        goto out;
@@ -415,7 +414,7 @@ static void __exit cosa_exit(void)
        printk(KERN_INFO "Unloading the cosa module\n");
 
        for (i=0; i<nr_cards; i++)
-               class_device_destroy(cosa_class, MKDEV(cosa_major, i));
+               device_destroy(cosa_class, MKDEV(cosa_major, i));
        class_destroy(cosa_class);
        for (cosa=cosa_cards; nr_cards--; cosa++) {
                /* Clean up the per-channel data */
@@ -572,13 +571,11 @@ static int cosa_probe(int base, int irq, int dma)
        sprintf(cosa->name, "cosa%d", cosa->num);
 
        /* Initialize the per-channel data */
-       cosa->chan = kmalloc(sizeof(struct channel_data)*cosa->nchannels,
-                            GFP_KERNEL);
+       cosa->chan = kcalloc(cosa->nchannels, sizeof(struct channel_data), GFP_KERNEL);
        if (!cosa->chan) {
                err = -ENOMEM;
                goto err_out3;
        }
-       memset(cosa->chan, 0, sizeof(struct channel_data)*cosa->nchannels);
        for (i=0; i<cosa->nchannels; i++) {
                cosa->chan[i].cosa = cosa;
                cosa->chan[i].num = i;