public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* query regarding not returning error if request_irq fails after rtc registration
@ 2014-05-15 16:45 RAGHAVENDRA GANIGA
  2014-05-15 16:56 ` Alessandro Zummo
  0 siblings, 1 reply; 2+ messages in thread
From: RAGHAVENDRA GANIGA @ 2014-05-15 16:45 UTC (permalink / raw)
  To: linux-kernel, rtc-linux, a.zummo

in ds1343 driver after the rtc is registered using devm_rtc_device_register
i am requesting irq using devm_request_threaded_irq, in case this request
fails instead of the driver bailing out it just uses dev_err to show the
error and the driver probe returns zero

my question is that the set_alarm and alarm_irq_enable is still active,
so should i use some flag in the global private variable of the driver
so that if the request irq fails, then using this flag the set_alarm
and alarm_irq_enable can return error since there is no irq handler
for the rtc interrupt 
or is there any other solution 
or let the set_alarm and alarm_irq_enable routine be as it is and will
not harm 

Thanks and Regards
Raghavendra Chandra Ganiga
Contact: +919594554858

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: query regarding not returning error if request_irq fails after rtc registration
  2014-05-15 16:45 query regarding not returning error if request_irq fails after rtc registration RAGHAVENDRA GANIGA
@ 2014-05-15 16:56 ` Alessandro Zummo
  0 siblings, 0 replies; 2+ messages in thread
From: Alessandro Zummo @ 2014-05-15 16:56 UTC (permalink / raw)
  To: RAGHAVENDRA GANIGA; +Cc: linux-kernel, rtc-linux

On Thu, 15 May 2014 22:15:14 +0530
RAGHAVENDRA GANIGA <ravi23ganiga@gmail.com> wrote:

> my question is that the set_alarm and alarm_irq_enable is still active,
> so should i use some flag in the global private variable of the driver
> so that if the request irq fails, then using this flag the set_alarm
> and alarm_irq_enable can return error since there is no irq handler
> for the rtc interrupt 
> or is there any other solution 
> or let the set_alarm and alarm_irq_enable routine be as it is and will

 you can use a flag (or set the irq to -1)

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-15 16:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-15 16:45 query regarding not returning error if request_irq fails after rtc registration RAGHAVENDRA GANIGA
2014-05-15 16:56 ` Alessandro Zummo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox