From: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
To: balbi-l0cyMroinI0@public.gmane.org,
bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org
Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org,
george.cherian-l0cyMroinI0@public.gmane.org,
kishon-l0cyMroinI0@public.gmane.org,
bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
Subject: [PATCH v4 1/8] usb: phy: omap-control: Get rid of platform data
Date: Mon, 19 Aug 2013 13:37:40 +0300 [thread overview]
Message-ID: <1376908667-14974-2-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1376908667-14974-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
omap-control device is present from OMAP4 onwards which
support device tree boots only. So get rid of platform data.
Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
drivers/usb/phy/phy-omap-control.c | 18 +++++++-----------
include/linux/usb/omap_control_usb.h | 4 ----
2 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/drivers/usb/phy/phy-omap-control.c b/drivers/usb/phy/phy-omap-control.c
index a4dda8e..7f446c4 100644
--- a/drivers/usb/phy/phy-omap-control.c
+++ b/drivers/usb/phy/phy-omap-control.c
@@ -197,8 +197,13 @@ static int omap_control_usb_probe(struct platform_device *pdev)
{
struct resource *res;
struct device_node *np = pdev->dev.of_node;
- struct omap_control_usb_platform_data *pdata =
- dev_get_platdata(&pdev->dev);
+
+ if (np) {
+ of_property_read_u32(np, "ti,type", &control_usb->type);
+ } else {
+ /* We only support DT boot */
+ return -EINVAL;
+ }
control_usb = devm_kzalloc(&pdev->dev, sizeof(*control_usb),
GFP_KERNEL);
@@ -207,15 +212,6 @@ static int omap_control_usb_probe(struct platform_device *pdev)
return -ENOMEM;
}
- if (np) {
- of_property_read_u32(np, "ti,type", &control_usb->type);
- } else if (pdata) {
- control_usb->type = pdata->type;
- } else {
- dev_err(&pdev->dev, "no pdata present\n");
- return -EINVAL;
- }
-
control_usb->dev = &pdev->dev;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h
index 27b5b8c..e2416b4 100644
--- a/include/linux/usb/omap_control_usb.h
+++ b/include/linux/usb/omap_control_usb.h
@@ -31,10 +31,6 @@ struct omap_control_usb {
u32 type;
};
-struct omap_control_usb_platform_data {
- u8 type;
-};
next prev parent reply other threads:[~2013-08-19 10:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 10:37 [PATCH v4 0/8] phy: omap-usb: Support multiple instances and new types Roger Quadros
[not found] ` <1376908667-14974-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2013-08-19 10:37 ` Roger Quadros [this message]
2013-08-19 10:37 ` [PATCH v4 2/8] usb: phy: omap: Add new device types and remove omap_control_usb3_phy_power() Roger Quadros
2013-08-19 10:37 ` [PATCH v4 3/8] usb: phy: omap-usb2: Don't use omap_get_control_dev() Roger Quadros
2013-08-19 10:37 ` [PATCH v4 4/8] usb: phy: omap-usb3: " Roger Quadros
2013-08-19 14:23 ` Sergei Shtylyov
2013-08-19 14:25 ` Roger Quadros
2013-08-19 10:37 ` [PATCH v4 5/8] usb: musb: omap2430: " Roger Quadros
2013-08-19 10:37 ` [PATCH v4 6/8] usb: phy: omap: get rid of omap_get_control_dev() Roger Quadros
2013-08-19 10:37 ` [PATCH v4 7/8] ARM: dts: omap4: update omap-control-usb nodes Roger Quadros
2013-08-19 10:37 ` [PATCH v4 8/8] ARM: dts: omap5: update omap-control-usb node Roger Quadros
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=1376908667-14974-2-git-send-email-rogerq@ti.com \
--to=rogerq-l0cymroini0@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=george.cherian-l0cyMroinI0@public.gmane.org \
--cc=kishon-l0cyMroinI0@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).