Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[pandora-kernel.git] / drivers / net / wan / cosa.c
index 9ef49ce..ff37bf4 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;
@@ -572,13 +572,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;