lkml.org 
[lkml]   [2010]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [rtc-linux] [PATCH 1/2] rtc: rtc-lpc32xx: Introduce RTC driver for the LPC32XX SoC
Hi Wolfram,

> > + retval = request_irq(rtc->irq, lpc32xx_rtc_alarm_interrupt,
> > + IRQF_DISABLED, "rtcalarm", rtc);
> > + if (retval < 0) {
> > + dev_err(&pdev->dev, "Can't request interrupt\n");
> > + goto err_free_irq;
> > + }
>
> I saw that a number of rtc-drivers register their irq after they
> register the device. I wonder if this is OK here? Couldn't it happen
> that after rtc_device_register() there is a preemption and another
> process could set the alarm? Then there is a race between interrupts
> already enabled and no handler available, no?
If you do it the other way around the irq might trigger and the handler
reports an irq for a device that doesn't exist yet.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-08-10 14:03    [W:0.142 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site