]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/atm/he.c
atm: Use ARRAY_SIZE macro when appropriate
[mv-sheeva.git] / drivers / atm / he.c
index 7d9b4e52f0bf4c985f1766fe2f88c35c78ea6c32..8510026b690a587b175427b1508970e6492f3a5d 100644 (file)
@@ -2351,7 +2351,7 @@ he_open(struct atm_vcc *vcc)
 
        cid = he_mkcid(he_dev, vpi, vci);
 
-       he_vcc = (struct he_vcc *) kmalloc(sizeof(struct he_vcc), GFP_ATOMIC);
+       he_vcc = kmalloc(sizeof(struct he_vcc), GFP_ATOMIC);
        if (he_vcc == NULL) {
                hprintk("unable to allocate he_vcc during open\n");
                return -ENOMEM;
@@ -3017,7 +3017,7 @@ read_prom_byte(struct he_dev *he_dev, int addr)
        he_writel(he_dev, val, HOST_CNTL);
        
        /* Send READ instruction */
-       for (i = 0; i < sizeof(readtab)/sizeof(readtab[0]); i++) {
+       for (i = 0; i < ARRAY_SIZE(readtab); i++) {
                he_writel(he_dev, val | readtab[i], HOST_CNTL);
                udelay(EEPROM_DELAY);
        }