diff --git a/drivers/usb/device/usb_dc_mcux_ehci.c b/drivers/usb/device/usb_dc_mcux_ehci.c index e545456ea6f..861bb647007 100644 --- a/drivers/usb/device/usb_dc_mcux_ehci.c +++ b/drivers/usb/device/usb_dc_mcux_ehci.c @@ -53,7 +53,7 @@ static usb_device_struct_t dev_data; #if ((defined(USB_DEVICE_CONFIG_EHCI)) && (USB_DEVICE_CONFIG_EHCI > 0U)) /* EHCI device driver interface */ -static const usb_device_controller_interface_struct_t s_UsbDeviceEhciInterface = { +static const usb_device_controller_interface_struct_t ehci_iface = { USB_DeviceEhciInit, USB_DeviceEhciDeinit, USB_DeviceEhciSend, USB_DeviceEhciRecv, USB_DeviceEhciCancel, USB_DeviceEhciControl }; @@ -77,7 +77,7 @@ int usb_dc_attach(void) LOG_WRN("already attached"); return 0; } - dev_data.interface = (const usb_device_controller_interface_struct_t *)(&s_UsbDeviceEhciInterface); + dev_data.interface = &ehci_iface; if (kStatus_USB_Success != dev_data.interface->deviceInit(CONTROLLER_ID, &dev_data, &dev_data.controllerHandle)) { return -EINVAL; }