From: Ilpo Järvinen Date: Fri, 9 Jan 2009 20:22:51 +0000 (-0800) Subject: misdn: one handmade ARRAY_SIZE converted X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1916ebb2ddad78ae6405b1291acb9f9de212ec49;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git misdn: one handmade ARRAY_SIZE converted Defined as: static struct device_attribute element_attributes[] = { Signed-off-by: Ilpo Järvinen Signed-off-by: Andrew Morton Signed-off-by: Karsten Keil --- diff --git a/drivers/isdn/mISDN/dsp_pipeline.c b/drivers/isdn/mISDN/dsp_pipeline.c index bf999bdc41c3..0c773fa9dbd0 100644 --- a/drivers/isdn/mISDN/dsp_pipeline.c +++ b/drivers/isdn/mISDN/dsp_pipeline.c @@ -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) {