[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180605231013.1803-4-marek.vasut+renesas@gmail.com>
Date: Wed, 6 Jun 2018 01:10:05 +0200
From: Marek Vasut <marek.vasut@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Marek Vasut <marek.vasut+renesas@...il.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Lee Jones <lee.jones@...aro.org>,
Mark Brown <broonie@...nel.org>,
Steve Twiss <stwiss.opensource@...semi.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
linux-renesas-soc@...r.kernel.org
Subject: [PATCH v4 04/12] mfd: da9063: Replace DA9063_NUM_IRQ with ARRAY_SIZE
Replace DA9063_NUM_IRQ macro which is not used anywhere with
plain ARRAY_SIZE().
Signed-off-by: Marek Vasut <marek.vasut+renesas@...il.com>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Lee Jones <lee.jones@...aro.org>
Cc: Mark Brown <broonie@...nel.org>
Cc: Steve Twiss <stwiss.opensource@...semi.com>
Cc: Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: linux-renesas-soc@...r.kernel.org
---
V4: New patch
---
drivers/mfd/da9063-irq.c | 2 +-
include/linux/mfd/da9063/core.h | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mfd/da9063-irq.c b/drivers/mfd/da9063-irq.c
index bd448d6cdf8b..34ea8d0334d7 100644
--- a/drivers/mfd/da9063-irq.c
+++ b/drivers/mfd/da9063-irq.c
@@ -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,
diff --git a/include/linux/mfd/da9063/core.h b/include/linux/mfd/da9063/core.h
index f3ae65db4c86..2622e9822086 100644
--- a/include/linux/mfd/da9063/core.h
+++ b/include/linux/mfd/da9063/core.h
@@ -73,7 +73,6 @@ enum da9063_irqs {
};
#define DA9063_IRQ_BASE_OFFSET 0
-#define DA9063_NUM_IRQ (DA9063_IRQ_GPI15 + 1 - DA9063_IRQ_BASE_OFFSET)
struct da9063 {
/* Device */
--
2.16.2
Powered by blists - more mailing lists