Skip to contentSkip to conversation

misdn: one handmade ARRAY_SIZE converted

PATCH New [email protected] 1 participant 1 message Dec 1, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/5 misdn: one handmade ARRAY_SIZE converted

From: Ilpo Järvinen <[email protected]>

Defined as:

static struct device_attribute element_attributes[] = {

---

 drivers/isdn/mISDN/dsp_pipeline.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/isdn/mISDN/dsp_pipeline.c renamed from drivers/isdn/mISDN/dsp_pipeline.c~misdn-one-handmade-array_size-converted +1 -2
diff -puN drivers/isdn/mISDN/dsp_pipeline.c~misdn-one-handmade-array_size-converted drivers/isdn/mISDN/dsp_pipeline.c
@@ -99,8 +99,7 @@ int mISDN_dsp_element_register(struct mI
 		goto err1;
 	}
 
-	for (i = 0; i < (sizeof(element_attributes)
-		/ sizeof(struct device_attribute)); ++i)
+	for (i = 0; i < ARRAY_SIZE(element_attributes); ++i)
 		ret = device_create_file(&entry->dev,
 				&element_attributes[i]);
 		if (ret) {

_