From: Rob Herring <robherring2@gmail.com>
To: linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org
Cc: Grant Likely <grant.likely@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
Rob Herring <rob.herring@calxeda.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 2/5] driver core: move to_platform_driver to platform_device.h
Date: Sun, 21 Apr 2013 21:13:15 -0500 [thread overview]
Message-ID: <1366596798-9457-3-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1366596798-9457-1-git-send-email-robherring2@gmail.com>
From: Rob Herring <rob.herring@calxeda.com>
In converting the last remaining of_platform_driver (ibmebus) to a regular
platform driver, to_platform_driver is needed to replace
to_of_platform_driver.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Grant Likely <grant.likely@linaro.org>
---
drivers/base/platform.c | 3 ---
include/linux/platform_device.h | 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index c0b8df3..819ecb0 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -29,9 +29,6 @@
/* For automatically allocated device IDs */
static DEFINE_IDA(platform_devid_ida);
-#define to_platform_driver(drv) (container_of((drv), struct platform_driver, \
- driver))
-
struct device platform_bus = {
.init_name = "platform",
};
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index c082c71..6e4e096 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -176,6 +176,9 @@ struct platform_driver {
const struct platform_device_id *id_table;
};
+#define to_platform_driver(drv) (container_of((drv), struct platform_driver, \
+ driver))
+
extern int platform_driver_register(struct platform_driver *);
extern void platform_driver_unregister(struct platform_driver *);
--
1.7.10.4
next prev parent reply other threads:[~2013-04-22 2:13 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 2:13 [PATCH 0/5] of_platform_driver and OF_DEVICE removal Rob Herring
2013-04-22 2:13 ` Rob Herring
2013-04-22 2:13 ` [PATCH 1/5] ibmebus: convert of_platform_driver to platform_driver Rob Herring
2013-04-22 2:13 ` Rob Herring
2013-04-25 15:23 ` Rob Herring
2013-04-25 15:23 ` Rob Herring
[not found] ` <CAL_JsqKDF=hPEM0Jz-zZSXBCXBZ=gBjLWL6QDvq+nFWkqY3DMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-04-25 17:35 ` Benjamin Herrenschmidt
2013-04-25 17:35 ` Benjamin Herrenschmidt
2013-04-25 17:35 ` Benjamin Herrenschmidt
2013-04-25 19:14 ` Rob Herring
2013-04-25 19:14 ` Rob Herring
2013-04-25 19:14 ` Rob Herring
[not found] ` <517980B0.3000401-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-25 20:12 ` Benjamin Herrenschmidt
2013-04-25 20:12 ` Benjamin Herrenschmidt
2013-04-25 20:12 ` Benjamin Herrenschmidt
2013-04-25 20:45 ` Rob Herring
2013-04-25 20:45 ` Rob Herring
2013-04-25 20:45 ` Rob Herring
2013-05-22 12:26 ` Rob Herring
2013-05-22 12:26 ` Rob Herring
[not found] ` <CAL_JsqKXt-gFL4y_k-_dFktpk1JD_S2G+hUsoOavw8QugFMOKA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-05-22 12:32 ` Benjamin Herrenschmidt
2013-05-22 12:32 ` Benjamin Herrenschmidt
2013-05-22 12:32 ` Benjamin Herrenschmidt
2013-06-12 5:29 ` Benjamin Herrenschmidt
2013-06-12 5:29 ` Benjamin Herrenschmidt
2013-06-12 5:29 ` Benjamin Herrenschmidt
2013-06-12 11:40 ` Grant Likely
2013-06-12 11:40 ` Grant Likely
2013-04-22 2:13 ` Rob Herring [this message]
2013-04-22 7:03 ` [PATCH 2/5] driver core: move to_platform_driver to platform_device.h Arnd Bergmann
2013-04-22 2:13 ` [PATCH 3/5] of: remove of_platform_driver Rob Herring
[not found] ` <1366596798-9457-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-22 2:13 ` [PATCH 4/5] usb: chipidea: depend on CONFIG_OF instead of CONFIG_OF_DEVICE Rob Herring
2013-04-22 2:13 ` Rob Herring
2013-04-22 2:13 ` [PATCH 5/5] of: remove CONFIG_OF_DEVICE Rob Herring
2013-04-22 7:03 ` [PATCH 0/5] of_platform_driver and OF_DEVICE removal Arnd Bergmann
2013-04-22 7:03 ` Arnd Bergmann
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=1366596798-9457-3-git-send-email-robherring2@gmail.com \
--to=robherring2@gmail.com \
--cc=arnd@arndb.de \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.