aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2015-03-05 05:18:45 -0500
committerKishon Vijay Abraham I <kishon@ti.com>2015-03-10 04:42:27 -0400
commit1f9ba767d5918796c7f32724777087f321fde30d (patch)
treeac97018183e9d02f399f5149bc1220f02a20433d /drivers/phy
parent320c3fcec64a9e115a3d8a5d005d2fb21c15ef01 (diff)
phy: omap-control: Remove unneeded ifdef CONFIG_OF guard and of_match_ptr
if !CONFIG_OF, the probe fails. This is a dt-only driver, so the ifdef CONFIG_OF guard and of_match_ptr are not needed. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-omap-control.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/phy/phy-omap-control.c b/drivers/phy/phy-omap-control.c
index efe724f97e02..a7653d930e6b 100644
--- a/drivers/phy/phy-omap-control.c
+++ b/drivers/phy/phy-omap-control.c
@@ -216,7 +216,6 @@ void omap_control_usb_set_mode(struct device *dev,
216 return; 216 return;
217 217
218 ctrl_phy = dev_get_drvdata(dev); 218 ctrl_phy = dev_get_drvdata(dev);
219
220 if (!ctrl_phy) { 219 if (!ctrl_phy) {
221 dev_err(dev, "Invalid control phy device\n"); 220 dev_err(dev, "Invalid control phy device\n");
222 return; 221 return;
@@ -241,8 +240,6 @@ void omap_control_usb_set_mode(struct device *dev,
241} 240}
242EXPORT_SYMBOL_GPL(omap_control_usb_set_mode); 241EXPORT_SYMBOL_GPL(omap_control_usb_set_mode);
243 242
244#ifdef CONFIG_OF
245
246static const enum omap_control_phy_type otghs_data = OMAP_CTRL_TYPE_OTGHS; 243static const enum omap_control_phy_type otghs_data = OMAP_CTRL_TYPE_OTGHS;
247static const enum omap_control_phy_type usb2_data = OMAP_CTRL_TYPE_USB2; 244static const enum omap_control_phy_type usb2_data = OMAP_CTRL_TYPE_USB2;
248static const enum omap_control_phy_type pipe3_data = OMAP_CTRL_TYPE_PIPE3; 245static const enum omap_control_phy_type pipe3_data = OMAP_CTRL_TYPE_PIPE3;
@@ -278,8 +275,6 @@ static const struct of_device_id omap_control_phy_id_table[] = {
278 {}, 275 {},
279}; 276};
280MODULE_DEVICE_TABLE(of, omap_control_phy_id_table); 277MODULE_DEVICE_TABLE(of, omap_control_phy_id_table);
281#endif
282
283 278
284static int omap_control_phy_probe(struct platform_device *pdev) 279static int omap_control_phy_probe(struct platform_device *pdev)
285{ 280{
@@ -287,8 +282,7 @@ static int omap_control_phy_probe(struct platform_device *pdev)
287 const struct of_device_id *of_id; 282 const struct of_device_id *of_id;
288 struct omap_control_phy *control_phy; 283 struct omap_control_phy *control_phy;
289 284
290 of_id = of_match_device(of_match_ptr(omap_control_phy_id_table), 285 of_id = of_match_device(omap_control_phy_id_table, &pdev->dev);
291 &pdev->dev);
292 if (!of_id) 286 if (!of_id)
293 return -EINVAL; 287 return -EINVAL;
294 288
@@ -344,7 +338,7 @@ static struct platform_driver omap_control_phy_driver = {
344 .probe = omap_control_phy_probe, 338 .probe = omap_control_phy_probe,
345 .driver = { 339 .driver = {
346 .name = "omap-control-phy", 340 .name = "omap-control-phy",
347 .of_match_table = of_match_ptr(omap_control_phy_id_table), 341 .of_match_table = omap_control_phy_id_table,
348 }, 342 },
349}; 343};
350 344