diff options
author | Josef Friedl <josef.friedl@speed.at> | 2019-08-18 15:56:06 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2019-09-02 11:20:40 +0100 |
commit | 7c3f7cd5a0c96ab40baaaf08968249fcb96c4057 (patch) | |
tree | ae060c7fd008d36e1cc7fb07b4a75f84d67bdd1d /drivers/mfd | |
parent | 09c1dec470029f812e86aa92908abfd9132c2fab (diff) |
mfd: mt6323: Replace boilerplate resource code with DEFINE_RES_* macros
Simplifies and reduces LoC.
Signed-off-by: Josef Friedl <josef.friedl@speed.at>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/mt6397-core.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 93c888153b77..7c81a20865f0 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -5,6 +5,7 @@ */ #include <linux/interrupt.h> +#include <linux/ioport.h> #include <linux/module.h> #include <linux/of_device.h> #include <linux/of_irq.h> @@ -19,16 +20,8 @@ #define MT6397_RTC_SIZE 0x3e static const struct resource mt6397_rtc_resources[] = { - { - .start = MT6397_RTC_BASE, - .end = MT6397_RTC_BASE + MT6397_RTC_SIZE, - .flags = IORESOURCE_MEM, - }, - { - .start = MT6397_IRQ_RTC, - .end = MT6397_IRQ_RTC, - .flags = IORESOURCE_IRQ, - }, + DEFINE_RES_MEM(MT6397_RTC_BASE, MT6397_RTC_SIZE), + DEFINE_RES_IRQ(MT6397_IRQ_RTC), }; static const struct resource mt6323_keys_resources[] = { |