On 6 April 2012 15:35, John Crispin <j...@phrozen.org> wrote:
> thx for all the patches
>
> On 06/04/12 14:37, Conor O'Gorman wrote:
>> +--- a/arch/mips/lantiq/xway/dev-dwc_otg.c
>> ++++ b/arch/mips/lantiq/xway/dev-dwc_otg.c
>> +@@ -43,7 +43,6 @@ static struct resource resources[] =
>> +     },
>> +     [1] = {
>> +             .name    = "dwc_otg_irq",
>> +-            .start   = LTQ_USB_INT,
>> +             .flags   = IORESOURCE_IRQ,
>> +     },
>> + };
>> +@@ -63,6 +62,7 @@ int __init
>> + xway_register_dwc(int pin)
>> + {
>> +     struct irq_data d;
>> ++    resources[1].start = LTQ_USB_INT;
>> +     d.irq = resources[1].start;
>> +     ltq_enable_irq(&d);
>> +     platform_dev.dev.platform_data = (void*) pin;
>
> is there a technical reason for this bit that i fail to understand or is
> it more a style preference fixup ?

You missed that part:
> +-#define LTQ_USB_INT           (INT_NUM_IM1_IRL0 + 22)
> ++#define LTQ_USB_INT           ((ltq_is_ase()) ? (INT_NUM_IM0_IRL0 + 31) :\
> ++                                                (INT_NUM_IM1_IRL0 + 22))

And I assume ltq_is_ase() can only be called at runtime.

Coding style wise I would prefer it to have at least (), or even
better as an inline function along

static inline int ltq_get_usb_int()
{
           return ltq_is_ase() ? (INT_NUM_IM0_IRL0 + 31) :
(INT_NUM_IM1_IRL0 + 22);
}


Jonas
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to