mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 21:24:00 +08:00
misdn: one handmade ARRAY_SIZE converted
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>
This commit is contained in:
parent
20b788045b
commit
1916ebb2dd
@ -110,8 +110,7 @@ int mISDN_dsp_element_register(struct mISDN_dsp_element *elem)
|
|||||||
}
|
}
|
||||||
list_add_tail(&entry->list, &dsp_elements);
|
list_add_tail(&entry->list, &dsp_elements);
|
||||||
|
|
||||||
for (i = 0; i < (sizeof(element_attributes)
|
for (i = 0; i < ARRAY_SIZE(element_attributes); ++i)
|
||||||
/ sizeof(struct device_attribute)); ++i)
|
|
||||||
ret = device_create_file(&entry->dev,
|
ret = device_create_file(&entry->dev,
|
||||||
&element_attributes[i]);
|
&element_attributes[i]);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
Loading…
Reference in New Issue
Block a user