ion: dummy driver: use ARRAY_SIZE for nr of heaps
authorTomas Winkler <tomas.winkler@intel.com>
Wed, 22 Jan 2014 17:15:55 +0000 (19:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Feb 2014 17:01:09 +0000 (09:01 -0800)
use ARRAY_SIZE to count number of heaps in static array

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion_dummy_driver.c

index 3854df7d6629d36617443800908f1539ec719f36..f8a7a32443716685a53f6bcf9aae6ccdfef12b6b 100644 (file)
@@ -58,7 +58,7 @@ struct ion_platform_heap dummy_heaps[] = {
 };
 
 struct ion_platform_data dummy_ion_pdata = {
-       .nr = 4,
+       .nr = ARRAY_SIZE(dummy_heaps),
        .heaps = dummy_heaps,
 };