Hello. On 04/12/2012 05:08 PM, Felipe Balbi wrote:
this drops a few lines of code and lets common APIs handle those for us.
Signed-off-by: Felipe Balbi<balbi@xxxxxx> --- drivers/usb/dwc3/core.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index b7ba154..e7c853a 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -433,14 +433,7 @@ static int __devinit dwc3_probe(struct platform_device *pdev) dwc->res = res; - res = devm_request_mem_region(dev, res->start, resource_size(res), - dev_name(dev)); - if (!res) { - dev_err(dev, "can't request mem region\n"); - return -ENOMEM; - } - - regs = devm_ioremap(dev, res->start, resource_size(res)); + regs = devm_request_and_ioremap(dev, res); if (!regs) { dev_err(dev, "ioremap failed\n");
Don't you think the error message should be edited too? WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html