Skip to content

Commit 4fd06af

Browse files
Roger Quadrosgregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4ae1a5b commit 4fd06af

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

drivers/usb/phy/phy-omap-control.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ static int omap_control_usb_probe(struct platform_device *pdev)
197197
{
198198
struct resource *res;
199199
struct device_node *np = pdev->dev.of_node;
200-
struct omap_control_usb_platform_data *pdata =
201-
dev_get_platdata(&pdev->dev);
202200

203201
control_usb = devm_kzalloc(&pdev->dev, sizeof(*control_usb),
204202
GFP_KERNEL);
@@ -207,14 +205,10 @@ static int omap_control_usb_probe(struct platform_device *pdev)
207205
return -ENOMEM;
208206
}
209207

210-
if (np) {
208+
if (np)
211209
of_property_read_u32(np, "ti,type", &control_usb->type);
212-
} else if (pdata) {
213-
control_usb->type = pdata->type;
214-
} else {
215-
dev_err(&pdev->dev, "no pdata present\n");
216-
return -EINVAL;
217-
}
210+
else
211+
return -EINVAL; /* We only support DT boot */
218212

219213
control_usb->dev = &pdev->dev;
220214

include/linux/usb/omap_control_usb.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ struct omap_control_usb {
3131
u32 type;
3232
};
3333

34-
struct omap_control_usb_platform_data {
35-
u8 type;
36-
};
37-
3834
enum omap_control_usb_mode {
3935
USB_MODE_UNDEFINED = 0,
4036
USB_MODE_HOST,

0 commit comments

Comments
 (0)