]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] cio: use ARRAY_SIZE in device_id.c
authorAhmed S. Darwish <darwish.07@gmail.com>
Mon, 12 Feb 2007 14:49:51 +0000 (15:49 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 12 Feb 2007 14:49:51 +0000 (15:49 +0100)
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/device_id.c

index f17275917fe55a6598e1120b316e8e7695d76c45..997f46874537fda00c4d0fc6f05da99fdf889883 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
 
 #include <asm/ccwdev.h>
 #include <asm/delay.h>
@@ -138,7 +139,7 @@ VM_virtual_device_info (__u16 devno, struct senseid *ps)
                ps->cu_model = 0x60;
                return;
        }
-       for (i = 0; i < sizeof(vm_devices) / sizeof(vm_devices[0]); i++)
+       for (i = 0; i < ARRAY_SIZE(vm_devices); i++)
                if (diag_data.vrdcvcla == vm_devices[i].vrdcvcla &&
                    diag_data.vrdcvtyp == vm_devices[i].vrdcvtyp) {
                        ps->cu_type = vm_devices[i].cu_type;