mfd: da9063: Replace DA9063_NUM_IRQ with ARRAY_SIZE
authorMarek Vasut <marek.vasut@gmail.com>
Mon, 11 Jun 2018 11:58:43 +0000 (13:58 +0200)
committerLee Jones <lee.jones@linaro.org>
Wed, 4 Jul 2018 06:16:09 +0000 (07:16 +0100)
Replace DA9063_NUM_IRQ macro which is not used anywhere with
plain ARRAY_SIZE().

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/da9063-irq.c
include/linux/mfd/da9063/core.h

index 044bd867f540948c4cfd4506e5939a310e0ff161..579947f834862e689c4ba5e342f21e5427f1963f 100644 (file)
@@ -94,7 +94,7 @@ static const struct regmap_irq da9063_irqs[] = {
 static const struct regmap_irq_chip da9063_irq_chip = {
        .name = "da9063-irq",
        .irqs = da9063_irqs,
-       .num_irqs = DA9063_NUM_IRQ,
+       .num_irqs = ARRAY_SIZE(da9063_irqs),
        .num_regs = 4,
        .status_base = DA9063_REG_EVENT_A,
        .mask_base = DA9063_REG_IRQ_MASK_A,
index 8e6684d884e0b9386300c9e8d4dcf0b70c5ccae6..260cd5834861b0db54e1d8f85893ea334b7c518f 100644 (file)
@@ -72,9 +72,6 @@ enum da9063_irqs {
        DA9063_IRQ_GPI15,
 };
 
-#define DA9063_IRQ_BASE_OFFSET 0
-#define DA9063_NUM_IRQ         (DA9063_IRQ_GPI15 + 1 - DA9063_IRQ_BASE_OFFSET)
-
 struct da9063 {
        /* Device */
        struct device   *dev;