musb: sunxi: Add proper macros instead of numericals
authorJagan Teki <jagan@amarulasolutions.com>
Mon, 7 May 2018 07:33:18 +0000 (13:03 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 28 May 2018 11:10:43 +0000 (16:40 +0530)
- add proper macros for musb_config members
- use bool 'true' for multipoint and dyn_fifo instead of numerical 1

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
drivers/usb/musb-new/sunxi.c

index ab902c65748a61c93d790b157a6e1434084753a0..332ac16663d368ef04076db45384bb9e13507e63 100644 (file)
@@ -296,11 +296,15 @@ static const struct musb_platform_ops sunxi_musb_ops = {
        .disable        = sunxi_musb_disable,
 };
 
+/* Allwinner OTG supports up to 5 endpoints */
+#define SUNXI_MUSB_MAX_EP_NUM          6
+#define SUNXI_MUSB_RAM_BITS            11
+
 static struct musb_hdrc_config musb_config = {
-       .multipoint     = 1,
-       .dyn_fifo       = 1,
-       .num_eps        = 6,
-       .ram_bits       = 11,
+       .multipoint     = true,
+       .dyn_fifo       = true,
+       .num_eps        = SUNXI_MUSB_MAX_EP_NUM,
+       .ram_bits       = SUNXI_MUSB_RAM_BITS,
 };
 
 static struct musb_hdrc_platform_data musb_plat = {