lkml.org 
[lkml]   [2006]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] device core: remove redundant call to device_initialize.
On Fri, May 05, 2006 at 07:35:42PM -0700, Andrew Morton wrote:
> A better design would be to rip out all the device_initialize() calls and
> require that the caller run device_initialize() before "add"ing or
> "register"ing the platform_device.

No. The caller must not call device_initialise(). They either use
platform_device_alloc() and platform_device_add(), or
platform_device_register(). Same rules apply to these as they
do for device_add() vs device_register().

> And indeed platform_device_alloc() already does that. If that is
> sufficient then we're in good shape.
>
> If it is not sufficient then more thought would be needed. We could at
> least run device_initialize() at the _start_ of platform_device_add(),
> rather than towards the end.

Just remove the call to device_initialise() in platform_device_add() -
that's something I missed when I renamed platform_device_register to
platform_device_add().

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-06 09:13    [W:0.940 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site