summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc/pxa27x_udc.c
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2014-10-01 22:06:15 +0200
committerFelipe Balbi <balbi@ti.com>2014-11-03 10:00:57 -0600
commit3ec8347bfa6e671666d04fc62c8302f5ffa344ba (patch)
treefacd467a29d70a109e1e865fc22a878f080e3529 /drivers/usb/gadget/udc/pxa27x_udc.c
parent2db88a76960747fb1af3757a81b94451c4bdfc49 (diff)
usb: gadget: pxa27x_udc: transfer mach_info into pxa_udc
Convert the mach info, and store the udc_command in the pxa_udc control structure. It is to be noticed that the udc_is_connected() in mach info is not transfered. This was not used, as mioa701 machine doesn't need it, balloon3 doesn't really use it, and most importantly the current driver never uses it. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc/pxa27x_udc.c')
-rw-r--r--drivers/usb/gadget/udc/pxa27x_udc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index d58319765021..5280f64683fb 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -1510,11 +1510,11 @@ static void dplus_pullup(struct pxa_udc *udc, int on)
{
if (udc->gpiod) {
gpiod_set_value(udc->gpiod, on);
- } else if (udc->mach && udc->mach->udc_command) {
+ } else if (udc->udc_command) {
if (on)
- udc->mach->udc_command(PXA2XX_UDC_CMD_CONNECT);
+ udc->udc_command(PXA2XX_UDC_CMD_CONNECT);
else
- udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
+ udc->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
}
udc->pullup_on = on;
}
@@ -1605,7 +1605,7 @@ static int pxa_udc_pullup(struct usb_gadget *_gadget, int is_active)
{
struct pxa_udc *udc = to_gadget_udc(_gadget);
- if (!udc->gpiod && !udc->mach->udc_command)
+ if (!udc->gpiod && !udc->udc_command)
return -EOPNOTSUPP;
dplus_pullup(udc, is_active);
@@ -2426,7 +2426,7 @@ static int pxa_udc_probe(struct platform_device *pdev)
return retval;
udc->gpiod = gpio_to_desc(mach->gpio_pullup);
}
- udc->mach = mach;
+ udc->udc_command = mach->udc_command;
}
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);