lkml.org 
[lkml]   [2009]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 5/7] [PATCH 5/8] can: SJA1000 generic platform bus driver
Sascha Hauer wrote:
> On Fri, May 15, 2009 at 11:35:06AM +0200, Wolfgang Grandegger wrote:
>> Hi Sascha,
>>
>> Sascha Hauer wrote:
>>> Hi Wolfgang,
[...}
>>>> + irq = res_irq->start;
>>>> + if (res_irq->flags & IRQF_TRIGGER_MASK)
>>>> + set_irq_type(irq, res_irq->flags & IRQF_TRIGGER_MASK);
>>> You shouldn't use set_irq_type on not yet requested irqs but instead
>>> pass the flags to the real driver and pass them in request_irq.
>> Why? I would require an extra member in the struct sja1000_priv.
>
> You change a resource you do not own. What if request_irq returns with
> -EBUSY? You already screwed up any other potential user.

OK, I added irq_flags to struct sja1000_priv, which will then be used
by the request_irq(). The driver must to set it appropriately, including
IRQF_SHARED. This also fixes the problem, that drivers used IRQF_SHARED
without reason.

Thanks,

Wolfgang.


\
 
 \ /
  Last update: 2009-05-15 15:15    [W:0.080 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site