From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Andrew Morton <akpm@osdl.org>,
"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:15:26 +0100 [thread overview]
Message-ID: <20060506071526.GC18829@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20060506071036.GB18829@flint.arm.linux.org.uk>
On Sat, May 06, 2006 at 08:10:36AM +0100, Russell King wrote:
> On Fri, May 05, 2006 at 07:35:42PM -0700, Andrew Morton wrote:
> > 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().
My email last night on the subject was more accurate than this - ETOOEARLY.
Have a patch instead.
# Base git commit: 5528e568a760442e0ec8fd2dea1f0791875a066b
# ([TCP]: Fix snd_cwnd adjustments in tcp_highspeed.c)
#
# Author: Russell King (Sat May 6 08:13:02 BST 2006)
# Committer: Russell King (Sat May 6 08:13:02 BST 2006)
#
# [DRVMODEL] Fix platform_device_add to use device_add
#
# platform_device_add() should be using device_add() rather
# than device_register() - any platform device passed to
# platform_device_add() should have already been initialised,
# either by platform_device_alloc() or platform_device_register().
#
# Signed-off-by: Russell King
#
# drivers/base/platform.c | 2 +-
# 1 files changed, 1 insertions(+), 1 deletions(-)
#
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -275,7 +275,7 @@ int platform_device_add(struct platform_
pr_debug("Registering platform device '%s'. Parent at %s\n",
pdev->dev.bus_id, pdev->dev.parent->bus_id);
- ret = device_register(&pdev->dev);
+ ret = device_add(&pdev->dev);
if (ret == 0)
return ret;
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
prev parent reply other threads:[~2006-05-06 7:15 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
2006-05-06 7:15 ` Russell King [this message]
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=20060506071526.GC18829@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