misdn: one handmade ARRAY_SIZE converted
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Fri, 9 Jan 2009 20:22:51 +0000 (12:22 -0800)
committerKarsten Keil <kkeil@suse.de>
Sun, 11 Jan 2009 17:17:50 +0000 (18:17 +0100)
Defined as:

static struct device_attribute element_attributes[] = {

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Karsten Keil <kkeil@suse.de>
drivers/isdn/mISDN/dsp_pipeline.c

index bf999bdc41c3e87df4a670738b81b90b215c1c97..0c773fa9dbd0bc67641bc6bc2ec919cbcbbcf889 100644 (file)
@@ -110,8 +110,7 @@ int mISDN_dsp_element_register(struct mISDN_dsp_element *elem)
        }
        list_add_tail(&entry->list, &dsp_elements);
 
-       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) {