Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112470
b: refs/heads/master
c: 84bab73
h: refs/heads/master
v: v3
  • Loading branch information
Eric Miao authored and Russell King committed Oct 7, 2008
1 parent 3064ce6 commit 60c3749
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 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: 596050bc75a56ea4bd9942abafff6dca657da81c
refs/heads/master: 84bab7393b0da5086e133b7f333b800d26f7166b
24 changes: 17 additions & 7 deletions trunk/drivers/usb/host/ohci-pxa27x.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,18 +255,20 @@ static void pxa27x_stop_hc(struct device *dev)
*/
int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device *pdev)
{
int retval;
int retval, irq;
struct usb_hcd *hcd;
struct pxaohci_platform_data *inf;
struct resource *r;

inf = pdev->dev.platform_data;

if (!inf)
return -ENODEV;

if (pdev->resource[1].flags != IORESOURCE_IRQ) {
pr_debug ("resource[1] is not IORESOURCE_IRQ");
return -ENOMEM;
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
pr_err("no resource of IORESOURCE_IRQ");
return -ENXIO;
}

usb_clk = clk_get(&pdev->dev, "USBCLK");
Expand All @@ -276,8 +278,16 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
hcd = usb_create_hcd (driver, &pdev->dev, "pxa27x");
if (!hcd)
return -ENOMEM;
hcd->rsrc_start = pdev->resource[0].start;
hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1;

r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!r) {
pr_err("no resource of IORESOURCE_MEM");
retval = -ENXIO;
goto err1;
}

hcd->rsrc_start = r->start;
hcd->rsrc_len = resource_size(r);

if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
pr_debug("request_mem_region failed");
Expand Down Expand Up @@ -305,7 +315,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device

ohci_hcd_init(hcd_to_ohci(hcd));

retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_DISABLED);
retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);
if (retval == 0)
return retval;

Expand Down

0 comments on commit 60c3749

Please sign in to comment.