diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2013-05-12 09:19:53 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-05-18 05:58:00 -0400 |
commit | 9c5fdd38276973c8c65394220e5e740be561cf92 (patch) | |
tree | 2b4e186aa912e1a637831ebac747743c8d980567 | |
parent | bb522812a1a620aa044448fcc8ea9baf0559be46 (diff) |
drivers/usb/phy: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r-- | drivers/usb/phy/phy-mv-u3d-usb.c | 5 | ||||
-rw-r--r-- | drivers/usb/phy/phy-mxs-usb.c | 5 | ||||
-rw-r--r-- | drivers/usb/phy/phy-samsung-usb2.c | 5 | ||||
-rw-r--r-- | drivers/usb/phy/phy-samsung-usb3.c | 5 |
4 files changed, 0 insertions, 20 deletions
diff --git a/drivers/usb/phy/phy-mv-u3d-usb.c b/drivers/usb/phy/phy-mv-u3d-usb.c index f7838a43347c..1568ea63e338 100644 --- a/drivers/usb/phy/phy-mv-u3d-usb.c +++ b/drivers/usb/phy/phy-mv-u3d-usb.c | |||
@@ -278,11 +278,6 @@ static int mv_u3d_phy_probe(struct platform_device *pdev) | |||
278 | } | 278 | } |
279 | 279 | ||
280 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 280 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
281 | if (!res) { | ||
282 | dev_err(dev, "missing mem resource\n"); | ||
283 | return -ENODEV; | ||
284 | } | ||
285 | |||
286 | phy_base = devm_ioremap_resource(dev, res); | 281 | phy_base = devm_ioremap_resource(dev, res); |
287 | if (IS_ERR(phy_base)) | 282 | if (IS_ERR(phy_base)) |
288 | return PTR_ERR(phy_base); | 283 | return PTR_ERR(phy_base); |
diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index 9d4381e64d51..eb25dd2a1429 100644 --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-usb.c | |||
@@ -130,11 +130,6 @@ static int mxs_phy_probe(struct platform_device *pdev) | |||
130 | int ret; | 130 | int ret; |
131 | 131 | ||
132 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 132 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
133 | if (!res) { | ||
134 | dev_err(&pdev->dev, "can't get device resources\n"); | ||
135 | return -ENOENT; | ||
136 | } | ||
137 | |||
138 | base = devm_ioremap_resource(&pdev->dev, res); | 133 | base = devm_ioremap_resource(&pdev->dev, res); |
139 | if (IS_ERR(base)) | 134 | if (IS_ERR(base)) |
140 | return PTR_ERR(base); | 135 | return PTR_ERR(base); |
diff --git a/drivers/usb/phy/phy-samsung-usb2.c b/drivers/usb/phy/phy-samsung-usb2.c index 45ffe036dacc..9d5e273abcc7 100644 --- a/drivers/usb/phy/phy-samsung-usb2.c +++ b/drivers/usb/phy/phy-samsung-usb2.c | |||
@@ -363,11 +363,6 @@ static int samsung_usb2phy_probe(struct platform_device *pdev) | |||
363 | int ret; | 363 | int ret; |
364 | 364 | ||
365 | phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 365 | phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
366 | if (!phy_mem) { | ||
367 | dev_err(dev, "%s: missing mem resource\n", __func__); | ||
368 | return -ENODEV; | ||
369 | } | ||
370 | |||
371 | phy_base = devm_ioremap_resource(dev, phy_mem); | 366 | phy_base = devm_ioremap_resource(dev, phy_mem); |
372 | if (IS_ERR(phy_base)) | 367 | if (IS_ERR(phy_base)) |
373 | return PTR_ERR(phy_base); | 368 | return PTR_ERR(phy_base); |
diff --git a/drivers/usb/phy/phy-samsung-usb3.c b/drivers/usb/phy/phy-samsung-usb3.c index 133f3d0c554f..5a9efcbcb532 100644 --- a/drivers/usb/phy/phy-samsung-usb3.c +++ b/drivers/usb/phy/phy-samsung-usb3.c | |||
@@ -239,11 +239,6 @@ static int samsung_usb3phy_probe(struct platform_device *pdev) | |||
239 | int ret; | 239 | int ret; |
240 | 240 | ||
241 | phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 241 | phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
242 | if (!phy_mem) { | ||
243 | dev_err(dev, "%s: missing mem resource\n", __func__); | ||
244 | return -ENODEV; | ||
245 | } | ||
246 | |||
247 | phy_base = devm_ioremap_resource(dev, phy_mem); | 242 | phy_base = devm_ioremap_resource(dev, phy_mem); |
248 | if (IS_ERR(phy_base)) | 243 | if (IS_ERR(phy_base)) |
249 | return PTR_ERR(phy_base); | 244 | return PTR_ERR(phy_base); |