public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Andrew Morton <akpm@osdl.org>
Cc: "Paolo 'Blaisorblade' Giarrusso" <blaisorblade@yahoo.it>,
	gregkh@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] device core: remove redundant call to device_initialize.
Date: Sat, 6 May 2006 08:10:36 +0100	[thread overview]
Message-ID: <20060506071036.GB18829@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20060505193542.0332557b.akpm@osdl.org>

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

  reply	other threads:[~2006-05-06  7:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-05 15:39 [PATCH] device core: remove redundant call to device_initialize Paolo 'Blaisorblade' Giarrusso
2006-05-05 22:14 ` Russell King
2006-05-06  2:35 ` Andrew Morton
2006-05-06  7:10   ` Russell King [this message]
2006-05-06  7:15     ` Russell King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060506071036.GB18829@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=akpm@osdl.org \
    --cc=blaisorblade@yahoo.it \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox