Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364583
b: refs/heads/master
c: b42f7f3
h: refs/heads/master
i:
  364581: dc7c78a
  364579: 54c8777
  364575: 9c22a59
v: v3
  • Loading branch information
Felipe Balbi committed Mar 18, 2013
1 parent 3f8038e commit d2d8bef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6110a7ebda18d103f28bec0eab65f7be01871233
refs/heads/master: b42f7f3091de06f25abf59a26a3446f7b2fd0a50
17 changes: 4 additions & 13 deletions trunk/drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2008,32 +2008,24 @@ static int musb_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
int irq = platform_get_irq_byname(pdev, "mc");
int status;
struct resource *iomem;
void __iomem *base;

iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!iomem || irq <= 0)
return -ENODEV;

base = ioremap(iomem->start, resource_size(iomem));
if (!base) {
dev_err(dev, "ioremap failed\n");
return -ENOMEM;
}
base = devm_ioremap_resource(dev, iomem);
if (IS_ERR(base))
return PTR_ERR(base);

status = musb_init_controller(dev, irq, base);
if (status < 0)
iounmap(base);

return status;
return musb_init_controller(dev, irq, base);
}

static int musb_remove(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct musb *musb = dev_to_musb(dev);
void __iomem *ctrl_base = musb->ctrl_base;

/* this gets called on rmmod.
* - Host mode: host may still be active
Expand All @@ -2044,7 +2036,6 @@ static int musb_remove(struct platform_device *pdev)
musb_shutdown(pdev);

musb_free(musb);
iounmap(ctrl_base);
device_init_wakeup(dev, 0);
#ifndef CONFIG_MUSB_PIO_ONLY
dma_set_mask(dev, *dev->parent->dma_mask);
Expand Down

0 comments on commit d2d8bef

Please sign in to comment.