aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2013-10-03 11:12:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-03 18:47:30 -0400
commit4fd06af96b9397fc54eb6b1a013a60c34693eef0 (patch)
tree56d4e96d9e3d209773e797176e1e7004d94882a8
parent4ae1a5bd3fabd7f7f3575309c7a0d676fecf6303 (diff)
usb: phy: omap-control: Get rid of platform data
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@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/phy/phy-omap-control.c12
-rw-r--r--include/linux/usb/omap_control_usb.h4
2 files changed, 3 insertions, 13 deletions
diff --git a/drivers/usb/phy/phy-omap-control.c b/drivers/usb/phy/phy-omap-control.c
index a4dda8e12562..977259252a8e 100644
--- a/drivers/usb/phy/phy-omap-control.c
+++ b/drivers/usb/phy/phy-omap-control.c
@@ -197,8 +197,6 @@ static int omap_control_usb_probe(struct platform_device *pdev)
197{ 197{
198 struct resource *res; 198 struct resource *res;
199 struct device_node *np = pdev->dev.of_node; 199 struct device_node *np = pdev->dev.of_node;
200 struct omap_control_usb_platform_data *pdata =
201 dev_get_platdata(&pdev->dev);
202 200
203 control_usb = devm_kzalloc(&pdev->dev, sizeof(*control_usb), 201 control_usb = devm_kzalloc(&pdev->dev, sizeof(*control_usb),
204 GFP_KERNEL); 202 GFP_KERNEL);
@@ -207,14 +205,10 @@ static int omap_control_usb_probe(struct platform_device *pdev)
207 return -ENOMEM; 205 return -ENOMEM;
208 } 206 }
209 207
210 if (np) { 208 if (np)
211 of_property_read_u32(np, "ti,type", &control_usb->type); 209 of_property_read_u32(np, "ti,type", &control_usb->type);
212 } else if (pdata) { 210 else
213 control_usb->type = pdata->type; 211 return -EINVAL; /* We only support DT boot */
214 } else {
215 dev_err(&pdev->dev, "no pdata present\n");
216 return -EINVAL;
217 }
218 212
219 control_usb->dev = &pdev->dev; 213 control_usb->dev = &pdev->dev;
220 214
diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h
index 27b5b8c931b0..e2416b45169b 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 {
31 u32 type; 31 u32 type;
32}; 32};
33 33
34struct omap_control_usb_platform_data {
35 u8 type;
36};
37
38enum omap_control_usb_mode { 34enum omap_control_usb_mode {
39 USB_MODE_UNDEFINED = 0, 35 USB_MODE_UNDEFINED = 0,
40 USB_MODE_HOST, 36 USB_MODE_HOST,