mirror of
https://xff.cz/git/u-boot/
synced 2025-09-08 20:22:10 +02:00
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>
This commit is contained in:
@@ -98,8 +98,9 @@ static const struct usb_ep mv_ep_init[2] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct mv_drv controller = {
|
static struct mv_drv controller = {
|
||||||
.gadget = {
|
.gadget = {
|
||||||
.name = "mv_udc",
|
.name = "mv_udc",
|
||||||
|
.ops = &mv_udc_ops,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -427,7 +428,6 @@ static int mvudc_probe(void)
|
|||||||
int i;
|
int i;
|
||||||
const int num = 2 * NUM_ENDPOINTS;
|
const int num = 2 * NUM_ENDPOINTS;
|
||||||
|
|
||||||
controller.gadget.ops = &mv_udc_ops;
|
|
||||||
epts = memalign(PAGE_SIZE, num * sizeof(struct ept_queue_head));
|
epts = memalign(PAGE_SIZE, num * sizeof(struct ept_queue_head));
|
||||||
memset(epts, 0, num * sizeof(struct ept_queue_head));
|
memset(epts, 0, num * sizeof(struct ept_queue_head));
|
||||||
for (i = 0; i < 2 * NUM_ENDPOINTS; i++) {
|
for (i = 0; i < 2 * NUM_ENDPOINTS; i++) {
|
||||||
|
Reference in New Issue
Block a user