[PATCH 04/10] misdn: one handmade ARRAY_SIZE converted

From: Ilpo Järvinen
Date: Thu Oct 30 2008 - 07:35:02 EST


Defined as:

static struct device_attribute element_attributes[] = {

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxx>
---
drivers/isdn/mISDN/dsp_pipeline.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/mISDN/dsp_pipeline.c b/drivers/isdn/mISDN/dsp_pipeline.c
index 850260a..45bff0a 100644
--- a/drivers/isdn/mISDN/dsp_pipeline.c
+++ b/drivers/isdn/mISDN/dsp_pipeline.c
@@ -99,8 +99,7 @@ int mISDN_dsp_element_register(struct mISDN_dsp_element *elem)
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) {
--
1.5.2.2