Thread (1 message) 1 message, 1 author, 2011-03-12

Re: [RFC 1/3] OLPC: Use device tree for platform identification

From: Grant Likely <hidden>
Date: 2011-03-12 07:45:30

On Tue, Mar 08, 2011 at 07:35:46PM -0800, Andres Salomon wrote:
On Tue, 8 Mar 2011 21:13:00 +0000
Daniel Drake [off-list ref] wrote:
quoted
On 4 March 2011 18:01, Andres Salomon [off-list ref] wrote:
quoted
quoted
+static int __init declare_of_platform_devices(void)
+{
+     return of_platform_bus_probe(NULL, of_ids, NULL);
+}
+device_initcall(declare_of_platform_devices);
How about 'olpc_create_platform_devices' or some such name?  That's
what's really happening here, right?
The reason I called it declare_of_platform_devices is because thats
what all the other platforms do (do a git grep). do you still think it
should be renamed?
Yes, unless there's some reason why it should be named "declare".  I'm
assuming the names used in ppc platform device code are like that for
historical reasons?
Probably, but they probably aren't very good reasons.  Name it what
makes sense for OLPC.  An olpc_ prefix certainly makes sense to me.

BTW, using a device_initcall() isn't very multiplatform friendly.  It
will get called regardless of the machine that the kernel is booted on
(OLPC or no) which probably isn't what you want.

g.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help