[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201012211305.06344.arnd@arndb.de>
Date: Tue, 21 Dec 2010 13:05:06 +0100
From: Arnd Bergmann <arnd@...db.de>
To: linux-arm-kernel@...ts.infradead.org
Cc: Alexey Charkov <alchark@...il.com>,
Ryan Mallon <ryan@...ewatersys.com>,
Eric Miao <eric.y.miao@...il.com>,
linux-kernel@...r.kernel.org,
"Uwe Kleine-König" <u.kleine-koenig@...gutronix.de>,
vt8500-wm8505-linux-kernel@...glegroups.com,
"Russell King - ARM Linux" <linux@....linux.org.uk>,
Albin Tonnerre <albin.tonnerre@...e-electrons.com>
Subject: Re: [PATCH 1/6 v9] ARM: Add basic architecture support for VIA/WonderMedia 85xx SoC's
On Tuesday 21 December 2010 11:00:43 Alexey Charkov wrote:
> #define WMT_IRQ_RES(__irq) \
> {\
> .flags = IORESOURCE_IRQ,\
> .start = __irq,\
> .end = __irq,\
> }
>
> void __init wmt_set_resources(void)
> {
> resources_lcdc[0] = WMT_MMIO_RES(wmt_current_regs->lcdc, SZ_1K);
> resources_lcdc[1] = WMT_IRQ_RES(wmt_current_irqs->lcdc);
> ...
> }
>
> Then there will be no half-empty initializations scattered around
> separate from the other assignments (which is probably the worst thing
> in current configuration).
If you use platform_device_add_resources() to add the resource
at a later point, or platform_device_register_simple, you don't
even need to statically allocate the resource structure, which may
also make this simpler because you can keep all the data structures
local to the function filling them out.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists