On Thu, Apr 12, 2012 at 09:58:53PM +0400, Sergei Shtylyov wrote: > 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? no -- balbi
Attachment:
signature.asc
Description: Digital signature