[PATCH v9 18/18] OMAP2,3: DSS2: Get DSS IRQ from platform device
From: Semwal, Sumit <hidden>
Date: 2011-01-24 05:50:57
Also in:
linux-omap
From: Semwal, Sumit <hidden>
Date: 2011-01-24 05:50:57
Also in:
linux-omap
On Sun, Jan 23, 2011 at 6:22 PM, Russell King - ARM Linux [off-list ref] wrote:
On Sun, Jan 23, 2011 at 03:39:23PM +0300, Sergei Shtylyov wrote:quoted
quoted
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 4d7a816..22690e9 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c[...]quoted
@@ -609,15 +609,18 @@ static int dss_init(bool skip_init)? ? ?REG_FLD_MOD(DSS_CONTROL, 0, 2, 2); ? ? ?/* venc clock mode = normal */ ? #endif - ? ?r = request_irq(INT_24XX_DSS_IRQ, + ? ?dss_irq = platform_get_irq(dss.pdev, 0); + ? ?if (dss_irq != -ENXIO) {? ?Better just 'dss_irq > 0', IMHO.If a function returns negative error codes, the correct test is ? ? ? ?ret < 0 not ? ? ? ?ret <= 0 The fact that it happens to be dealing with IRQ numbers where IRQ0 may not be valid is neither here nor there.
Thanks Sergei, Russell, I will update this to check for (ret < 0) as the error case, and re-submit.