lkml.org 
[lkml]   [2013]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified
On 03/28/2013 09:51 AM, Russell King - ARM Linux wrote:
> On Thu, Mar 28, 2013 at 09:48:18AM -0500, Rob Herring wrote:
>> On 03/28/2013 04:41 AM, Maxime Ripard wrote:
>>> + if (machine_desc->init_irq)
>>> + machine_desc->init_irq();
>>> + else
>>> + irqchip_init();
>>
>> There needs to be an empty version defined for !OF.
>
> Better:
>
> #ifdef CONFIG_OF
> if (!machine_desc->init_irq)
> irqchip_init();
> else
> #endif

Or the new style:

if (IS_ENABLED(CONFIG_OF) && !machine_desc->init_irq)
irqchip_init();
else

That needs the empty version, but handles your case.

Rob

> machine_desc->init_irq();
>
> which means we don't even get the test if !OF, and if someone mistakenly
> sets this to NULL for a !OF platform, they get to know about it.
>



\
 
 \ /
  Last update: 2013-03-28 20:42    [W:1.882 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site