summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-03-09 09:29:54 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-03-09 09:29:56 +0100
commitd6ef702f4f0d88e9aaa06884ef4c77fb7a42f55d (patch)
treec2204625f7fd7c4780ae05e5ac0a86c96a20691a
parent19d5f3a77f9d8016df3f9c5cc2b27e18cf706b9b (diff)
downloadbarebox-d6ef702f4f0d88e9aaa06884ef4c77fb7a42f55d.tar.gz
usb: imx: role_registered contains role
role_registered contains the role, it's not a bool indicating that a role is registered. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/usb/imx/chipidea-imx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c
index ccd5346..67d01d3 100644
--- a/drivers/usb/imx/chipidea-imx.c
+++ b/drivers/usb/imx/chipidea-imx.c
@@ -167,7 +167,7 @@ static int ci_register_role(struct imx_chipidea *ci)
if (ci->mode == IMX_USB_MODE_HOST) {
if (IS_ENABLED(CONFIG_USB_EHCI)) {
- ci->role_registered = 1;
+ ci->role_registered = IMX_USB_MODE_HOST;
ret = regulator_enable(ci->vbus);
if (ret)
return ret;
@@ -185,7 +185,7 @@ static int ci_register_role(struct imx_chipidea *ci)
if (ci->mode == IMX_USB_MODE_DEVICE) {
if (IS_ENABLED(CONFIG_USB_GADGET_DRIVER_ARC)) {
- ci->role_registered = 1;
+ ci->role_registered = IMX_USB_MODE_DEVICE;
return ci_udc_register(ci->dev, ci->base);
} else {
dev_err(ci->dev, "USB device support not available\n");