From: Tomas Winkler Date: Wed, 22 Jan 2014 17:15:55 +0000 (+0200) Subject: ion: dummy driver: use ARRAY_SIZE for nr of heaps X-Git-Tag: v5.15~18422^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18691f53bcaab1226f22b733189ec9da190bb7a2;p=platform%2Fkernel%2Flinux-starfive.git ion: dummy driver: use ARRAY_SIZE for nr of heaps use ARRAY_SIZE to count number of heaps in static array Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c index 3854df7..f8a7a32 100644 --- a/drivers/staging/android/ion/ion_dummy_driver.c +++ b/drivers/staging/android/ion/ion_dummy_driver.c @@ -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, };