Message ID | 1478945246-32056-4-git-send-email-Nicolae_Rosia@mentor.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi, > Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com> > --- > drivers/rtc/Kconfig | 2 +- > drivers/rtc/rtc-twl.c | 4 +++- > 2 files changed, 4 insertions(+), 2 deletions(-) This patch is missing long description. I would have patched it the other way around. There is no reason to use irq_of_parse_and_map if generic platform_get_irq can be used. -- Sebastian
Hi, On Sat, Nov 12, 2016 at 1:20 PM, Sebastian Reichel <sre@kernel.org> wrote: > This patch is missing long description. I would have patched it the > other way around. There is no reason to use irq_of_parse_and_map if > generic platform_get_irq can be used. Since this patch series removes platform support and makes the driver DT only, I thought it would be a good idea to make it explicit that it depends on OF_IRQ. Regards, Nicolae -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
* Nicolae Rosia <nicolae.rosia.oss@gmail.com> [161112 03:37]: > Hi, > > > On Sat, Nov 12, 2016 at 1:20 PM, Sebastian Reichel <sre@kernel.org> wrote: > > This patch is missing long description. I would have patched it the > > other way around. There is no reason to use irq_of_parse_and_map if > > generic platform_get_irq can be used. > Since this patch series removes platform support and makes the driver DT only, > I thought it would be a good idea to make it explicit that it depends on OF_IRQ. You can still use platform_get_irq(), eventually that will be just some generic call. Don't we already have the "generic" names defined somewhere in kernel? Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 2189216..7ac7579 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -481,7 +481,7 @@ config RTC_DRV_TWL92330 config RTC_DRV_TWL4030 tristate "TI TWL4030/TWL5030/TWL6030/TPS659x0" depends on TWL4030_CORE - depends on OF + depends on OF && OF_IRQ help If you say yes here you get support for the RTC on the TWL4030/TWL5030/TWL6030 family chips, used mostly with OMAP3 platforms. diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index 3d76322..7994baf 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c @@ -30,6 +30,7 @@ #include <linux/platform_device.h> #include <linux/interrupt.h> #include <linux/of.h> +#include <linux/of_irq.h> #include <linux/i2c/twl.h> @@ -494,7 +495,7 @@ static int twl_rtc_probe(struct platform_device *pdev) struct twl_rtc *twl_rtc; struct device_node *np = pdev->dev.of_node; int ret = -EINVAL; - int irq = platform_get_irq(pdev, 0); + int irq; u8 rd_reg; if (!np) { @@ -502,6 +503,7 @@ static int twl_rtc_probe(struct platform_device *pdev) return -EINVAL; } + irq = irq_of_parse_and_map(np, 0); if (irq <= 0) return ret;
Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com> --- drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-twl.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)