Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363756
b: refs/heads/master
c: e62662c
h: refs/heads/master
v: v3
  • Loading branch information
Paul Zimmerman authored and Greg Kroah-Hartman committed Mar 26, 2013
1 parent 41dc413 commit 4ef6db2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 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: 8509f2f43a2b245ade076d1568daa2cf15446732
refs/heads/master: e62662c7f3079e02a1e59229901648758a49464a
19 changes: 9 additions & 10 deletions trunk/drivers/staging/dwc2/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2682,7 +2682,7 @@ static void dwc2_set_uninitialized(int *p, int size)
* USB bus with the core and calls the hc_driver->start() function. It returns
* a negative error on failure.
*/
int dwc2_hcd_init(struct device *dev, struct dwc2_hsotg *hsotg, int irq,
int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq,
struct dwc2_core_params *params)
{
struct usb_hcd *hcd;
Expand All @@ -2691,7 +2691,7 @@ int dwc2_hcd_init(struct device *dev, struct dwc2_hsotg *hsotg, int irq,
int i, num_channels;
int retval = -ENOMEM;

dev_dbg(dev, "DWC OTG HCD INIT\n");
dev_dbg(hsotg->dev, "DWC OTG HCD INIT\n");

/*
* Attempt to ensure this device is really a DWC_otg Controller.
Expand All @@ -2702,12 +2702,12 @@ int dwc2_hcd_init(struct device *dev, struct dwc2_hsotg *hsotg, int irq,
snpsid = readl(hsotg->regs + GSNPSID);
if ((snpsid & 0xfffff000) != 0x4f542000 &&
(snpsid & 0xfffff000) != 0x4f543000) {
dev_err(dev, "Bad value for GSNPSID: 0x%08x\n", snpsid);
dev_err(hsotg->dev, "Bad value for GSNPSID: 0x%08x\n", snpsid);
retval = -ENODEV;
goto error1;
}

hcd = usb_create_hcd(&dwc2_hc_driver, dev, dev_name(dev));
hcd = usb_create_hcd(&dwc2_hc_driver, hsotg->dev, dev_name(hsotg->dev));
if (!hcd)
goto error1;

Expand All @@ -2716,7 +2716,6 @@ int dwc2_hcd_init(struct device *dev, struct dwc2_hsotg *hsotg, int irq,
spin_lock_init(&hsotg->lock);
((struct wrapper_priv_data *) &hcd->hcd_priv)->hsotg = hsotg;
hsotg->priv = hcd;
hsotg->dev = dev;

/*
* Store the contents of the hardware configuration registers here for
Expand Down Expand Up @@ -2913,7 +2912,7 @@ int dwc2_hcd_init(struct device *dev, struct dwc2_hsotg *hsotg, int irq,

usb_put_hcd(hcd);
error1:
dev_err(dev, "%s() FAILED, returning %d\n", __func__, retval);
dev_err(hsotg->dev, "%s() FAILED, returning %d\n", __func__, retval);
return retval;
}
EXPORT_SYMBOL_GPL(dwc2_hcd_init);
Expand All @@ -2922,17 +2921,17 @@ EXPORT_SYMBOL_GPL(dwc2_hcd_init);
* Removes the HCD.
* Frees memory and resources associated with the HCD and deregisters the bus.
*/
void dwc2_hcd_remove(struct device *dev, struct dwc2_hsotg *hsotg)
void dwc2_hcd_remove(struct dwc2_hsotg *hsotg)
{
struct usb_hcd *hcd;

dev_dbg(dev, "DWC OTG HCD REMOVE\n");
dev_dbg(hsotg->dev, "DWC OTG HCD REMOVE\n");

hcd = dwc2_hsotg_to_hcd(hsotg);
dev_dbg(dev, "hsotg->hcd = %p\n", hcd);
dev_dbg(hsotg->dev, "hsotg->hcd = %p\n", hcd);

if (!hcd) {
dev_dbg(dev, "%s: dwc2_hsotg_to_hcd(hsotg) NULL!\n",
dev_dbg(hsotg->dev, "%s: dwc2_hsotg_to_hcd(hsotg) NULL!\n",
__func__);
return;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/dwc2/hcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,9 @@ static inline u8 dwc2_hcd_is_pipe_out(struct dwc2_hcd_pipe_info *pipe)
return !dwc2_hcd_is_pipe_in(pipe);
}

extern int dwc2_hcd_init(struct device *dev, struct dwc2_hsotg *hsotg,
int irq, struct dwc2_core_params *params);
extern void dwc2_hcd_remove(struct device *dev, struct dwc2_hsotg *hsotg);
extern int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq,
struct dwc2_core_params *params);
extern void dwc2_hcd_remove(struct dwc2_hsotg *hsotg);
extern int dwc2_set_parameters(struct dwc2_hsotg *hsotg,
struct dwc2_core_params *params);

Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/staging/dwc2/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static void dwc2_driver_remove(struct pci_dev *dev)

dev_dbg(&dev->dev, "%s(%p)\n", __func__, dev);

dwc2_hcd_remove(&dev->dev, hsotg);
dwc2_hcd_remove(hsotg);
pci_disable_device(dev);
}

Expand Down Expand Up @@ -133,6 +133,7 @@ static int dwc2_driver_probe(struct pci_dev *dev,

pci_set_power_state(dev, PCI_D0);

hsotg->dev = &dev->dev;
hsotg->regs = devm_request_and_ioremap(&dev->dev, &dev->resource[0]);
if (!hsotg->regs)
return -ENOMEM;
Expand All @@ -157,7 +158,7 @@ static int dwc2_driver_probe(struct pci_dev *dev,
pci_set_consistent_dma_mask(dev, 0);
}

retval = dwc2_hcd_init(&dev->dev, hsotg, dev->irq, &dwc2_module_params);
retval = dwc2_hcd_init(hsotg, dev->irq, &dwc2_module_params);
if (retval) {
pci_disable_device(dev);
return retval;
Expand All @@ -171,7 +172,7 @@ static int dwc2_driver_probe(struct pci_dev *dev,
IRQF_SHARED | IRQ_LEVEL, dev_name(&dev->dev),
hsotg);
if (retval)
dwc2_hcd_remove(&dev->dev, hsotg);
dwc2_hcd_remove(hsotg);

return retval;
}
Expand Down

0 comments on commit 4ef6db2

Please sign in to comment.