diff options
Diffstat (limited to 'hw/sh_intc.c')
-rw-r--r-- | hw/sh_intc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/hw/sh_intc.c b/hw/sh_intc.c index 136e7dd216..9039e555d5 100644 --- a/hw/sh_intc.c +++ b/hw/sh_intc.c @@ -17,7 +17,6 @@ //#define DEBUG_INTC_SOURCES #define INTC_A7(x) ((x) & 0x1fffffff) -#define INTC_ARRAY(x) (sizeof(x) / sizeof(x[0])) void sh_intc_toggle_source(struct intc_source *source, int enable_adj, int assert_adj) @@ -327,7 +326,7 @@ static void sh_intc_register_source(struct intc_desc *desc, for (i = 0; i < desc->nr_mask_regs; i++) { struct intc_mask_reg *mr = desc->mask_regs + i; - for (k = 0; k < INTC_ARRAY(mr->enum_ids); k++) { + for (k = 0; k < ARRAY_SIZE(mr->enum_ids); k++) { if (mr->enum_ids[k] != source) continue; @@ -342,7 +341,7 @@ static void sh_intc_register_source(struct intc_desc *desc, for (i = 0; i < desc->nr_prio_regs; i++) { struct intc_prio_reg *pr = desc->prio_regs + i; - for (k = 0; k < INTC_ARRAY(pr->enum_ids); k++) { + for (k = 0; k < ARRAY_SIZE(pr->enum_ids); k++) { if (pr->enum_ids[k] != source) continue; @@ -357,7 +356,7 @@ static void sh_intc_register_source(struct intc_desc *desc, for (i = 0; i < nr_groups; i++) { struct intc_group *gr = groups + i; - for (k = 0; k < INTC_ARRAY(gr->enum_ids); k++) { + for (k = 0; k < ARRAY_SIZE(gr->enum_ids); k++) { if (gr->enum_ids[k] != source) continue; @@ -400,7 +399,7 @@ void sh_intc_register_sources(struct intc_desc *desc, s = sh_intc_source(desc, gr->enum_id); s->next_enum_id = gr->enum_ids[0]; - for (k = 1; k < INTC_ARRAY(gr->enum_ids); k++) { + for (k = 1; k < ARRAY_SIZE(gr->enum_ids); k++) { if (!gr->enum_ids[k]) continue; |