summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-mt6397.c
diff options
context:
space:
mode:
authorChen Zhong <chen.zhong@mediatek.com>2017-10-25 16:15:59 +0300
committerLee Jones <lee.jones@linaro.org>2018-04-16 17:16:04 +0300
commite695d3a0b3b302974c1fd7b36ea91fe58fb9ca14 (patch)
treebfc53de7aebef7a8830520b09b193bc9c524911a /drivers/rtc/rtc-mt6397.c
parent60cc43fc888428bb2f18f08997432d426a243338 (diff)
downloadlinux-e695d3a0b3b302974c1fd7b36ea91fe58fb9ca14.tar.xz
mfd: mt6397: Create irq mappings in mfd core driver
The core driver should create and manage irq mappings instead of leaf drivers. This patch change to pass irq domain to devm_mfd_add_devices() and it will create mapping for irq resources automatically. And remove irq mapping in rtc driver since this has been done in core driver. Signed-off-by: Chen Zhong <chen.zhong@mediatek.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/rtc/rtc-mt6397.c')
-rw-r--r--drivers/rtc/rtc-mt6397.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c
index 1a61fa56f3ad..385f8303bb41 100644
--- a/drivers/rtc/rtc-mt6397.c
+++ b/drivers/rtc/rtc-mt6397.c
@@ -322,10 +322,9 @@ static int mtk_rtc_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
rtc->addr_base = res->start;
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- rtc->irq = irq_create_mapping(mt6397_chip->irq_domain, res->start);
- if (rtc->irq <= 0)
- return -EINVAL;
+ rtc->irq = platform_get_irq(pdev, 0);
+ if (rtc->irq < 0)
+ return rtc->irq;
rtc->regmap = mt6397_chip->regmap;
rtc->dev = &pdev->dev;