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-Url: http://git.lede-project.org./?a=commitdiff_plain;h=18691f53bcaab1226f22b733189ec9da190bb7a2;p=openwrt%2Fstaging%2Fblogic.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 3854df7d6629..f8a7a3244371 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, };