From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Ming Lei <tom.leiming@gmail.com>,
David Brownell <david-b@pacbell.net>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 4/5] Revert driver core: fix passing platform_data
Date: Fri, 8 May 2009 20:25:58 -0700 [thread overview]
Message-ID: <1241839559-9157-4-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20090509032432.GA9000@kroah.com>
From: Ming Lei <tom.leiming@gmail.com>
This reverts commit ce21c7bcd796fc4f45d48781b7e85f493cc55ee5:
We will remove platform_data field from struct device until
all platform devices pass its specific data from platfom_device
and all platform drivers use platform specific data passed by
platform_device->platform_data. This kind of conversion will
need a long time, for thousands of files is affected.
To make the conversion easily, we allow platform specific data
passed by struct device or struct platform_device and platform
driver may use it from struct device or struct platform_device.
As we really don't want to do this at all.
Cc: David Brownell <david-b@pacbell.net>
Cc: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/base/platform.c | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index ec5400c..d1d0ee4 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -247,20 +247,7 @@ int platform_device_add(struct platform_device *pdev)
else
dev_set_name(&pdev->dev, pdev->name);
- /* We will remove platform_data field from struct device
- * if all platform devices pass its platform specific data
- * from platform_device. The conversion is going to be a
- * long time, so we allow the two cases coexist to make
- * this kind of fix more easily*/
- if (pdev->platform_data && pdev->dev.platform_data) {
- printk(KERN_ERR
- "%s: use which platform_data?\n",
- dev_name(&pdev->dev));
- } else if (pdev->platform_data) {
- pdev->dev.platform_data = pdev->platform_data;
- } else if (pdev->dev.platform_data) {
- pdev->platform_data = pdev->dev.platform_data;
- }
+ pdev->platform_data = pdev->dev.platform_data;
for (i = 0; i < pdev->num_resources; i++) {
struct resource *p, *r = &pdev->resource[i];
--
1.6.3
next prev parent reply other threads:[~2009-05-09 3:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-09 3:24 [GIT PATCH] USB fixes for 2.6.30-rc4 Greg KH
2009-05-09 3:25 ` [PATCH 1/5] Driver core: platform: fix kernel-doc warnings Greg Kroah-Hartman
2009-05-09 3:25 ` [PATCH 2/5] Doc/sysfs-rules: Swap the order of the words so the sentence makes more sense Greg Kroah-Hartman
2009-05-09 3:25 ` [PATCH 3/5] Remove old PRINTK_DEBUG config item Greg Kroah-Hartman
2009-05-09 3:25 ` Greg Kroah-Hartman [this message]
2009-05-09 3:25 ` [PATCH 5/5] Revert driver core: move platform_data into platform_device Greg Kroah-Hartman
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=1241839559-9157-4-git-send-email-gregkh@suse.de \
--to=gregkh@suse.de \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
--cc=tom.leiming@gmail.com \
/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