Skip to content

Commit

Permalink
usb/mv_udc_core: fix compile
Browse files Browse the repository at this point in the history
|drivers/usb/gadget/mv_udc_core.c:2108: error: label `error' used but not defined

This seems to be broken since the initial commit. I changed this to a
simple return. The other user is the probe code which lets ->probe()
fail on error here.

|drivers/usb/gadget/mv_udc_core.c:2107: warning: passing argument 1 of `dev_err' from incompatible pointer type
|drivers/usb/gadget/mv_udc_core.c:2118: warning: initialization from incompatible pointer type
|drivers/usb/gadget/mv_udc_core.c:2119: warning: initialization from incompatible pointer type
|drivers/usb/gadget/mv_udc_core.c:2130: error: initializer element is not constant
|drivers/usb/gadget/mv_udc_core.c:2130: error: (near initialization for `udc_driver.driver.pm')

Cc: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Sebastian Andrzej Siewior authored and Greg Kroah-Hartman committed Jun 6, 2011
1 parent b38b03b commit cb42447
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/usb/gadget/mv_udc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,7 @@ int mv_udc_probe(struct platform_device *dev)
}

#ifdef CONFIG_PM
static int mv_udc_suspend(struct platform_device *_dev, pm_message_t state)
static int mv_udc_suspend(struct device *_dev)
{
struct mv_udc *udc = the_controller;

Expand All @@ -2092,15 +2092,15 @@ static int mv_udc_suspend(struct platform_device *_dev, pm_message_t state)
return 0;
}

static int mv_udc_resume(struct platform_device *_dev)
static int mv_udc_resume(struct device *_dev)
{
struct mv_udc *udc = the_controller;
int retval;

retval = mv_udc_phy_init(udc->phy_regs);
if (retval) {
dev_err(_dev, "phy initialization error %d\n", retval);
goto error;
return retval;
}
udc_reset(udc);
ep0_reset(udc);
Expand All @@ -2122,7 +2122,7 @@ static struct platform_driver udc_driver = {
.owner = THIS_MODULE,
.name = "pxa-u2o",
#ifdef CONFIG_PM
.pm = mv_udc_pm_ops,
.pm = &mv_udc_pm_ops,
#endif
},
};
Expand Down

0 comments on commit cb42447

Please sign in to comment.