Skip to contentSkip to conversation

ion: dummy driver: use ARRAY_SIZE for nr of heaps

staging-next Tomas Winkler 1 participant 1 message Jan 22, 2014 Staging

lore
Share & tools
lore
#0 lore raw

use ARRAY_SIZE to count number of heaps in static array

---
 drivers/staging/android/ion/ion_dummy_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/ion/ion_dummy_driver.c +1 -1
index 55b2002..c1df26c 100644
@@ -57,7 +57,7 @@ struct ion_platform_heap dummy_heaps[] = {
 };
 
 struct ion_platform_data dummy_ion_pdata = {
-	.nr = 4,
+	.nr = ARRAY_SIZE(dummy_heaps),
 	.heaps = dummy_heaps,
 };
 
Signature · 1 line
1.8.4.2