Commit fe48f05817a0c44724b6e4c6af04c1843f387cea

Authored by Marek Vasut
1 parent f646317739

usb: mv_udc: Init mv_drv.gadget.ops statically

There is no need to init this field at runtime, so init it statically.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

drivers/usb/gadget/mv_udc.c
... ... @@ -98,8 +98,9 @@
98 98 };
99 99  
100 100 static struct mv_drv controller = {
101   - .gadget = {
102   - .name = "mv_udc",
  101 + .gadget = {
  102 + .name = "mv_udc",
  103 + .ops = &mv_udc_ops,
103 104 },
104 105 };
105 106  
... ... @@ -427,7 +428,6 @@
427 428 int i;
428 429 const int num = 2 * NUM_ENDPOINTS;
429 430  
430   - controller.gadget.ops = &mv_udc_ops;
431 431 epts = memalign(PAGE_SIZE, num * sizeof(struct ept_queue_head));
432 432 memset(epts, 0, num * sizeof(struct ept_queue_head));
433 433 for (i = 0; i < 2 * NUM_ENDPOINTS; i++) {