Message ID | DDD0107D-B314-4A2C-836A-446023778627@edpnet.be |
---|---|
State | Changes Requested |
Delegated to: | Kever Yang |
Headers | show |
Series | Rockchip board with DWC3 controller may lead to usb init function declared twice | expand |
Hi Janpieter, Please add commit message to descript the issue you met and use the correct format in the subject. Thanks, - Kever On 2021/3/20 下午1:19, Janpieter Sollie wrote: > diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c > index c386b529..11866e6e 100644 > --- a/arch/arm/mach-rockchip/board.c > +++ b/arch/arm/mach-rockchip/board.c > @@ -67,7 +67,7 @@ static struct dwc2_plat_otg_data otg_data = { > .tx_fifo_sz = 128, > }; > > -int board_usb_init(int index, enum usb_init_type init) > +static int __board_usb_init(int index, enum usb_init_type init) > { > ofnode node; > const char *mode; > @@ -151,6 +151,13 @@ int board_usb_init(int index, enum usb_init_type init) > } > #endif /* CONFIG_USB_DWC3_GADGET */ > > +#else > +int board_usb_init(int index, enum usb_init_type init) > +{ > + return __board_usb_init(&dwc3_device_data); > +} > + > + > #endif /* CONFIG_USB_GADGET */ > > #if CONFIG_IS_ENABLED(FASTBOOT) > >
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index c386b529..11866e6e 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -67,7 +67,7 @@ static struct dwc2_plat_otg_data otg_data = { .tx_fifo_sz = 128, }; -int board_usb_init(int index, enum usb_init_type init) +static int __board_usb_init(int index, enum usb_init_type init) { ofnode node; const char *mode; @@ -151,6 +151,13 @@ int board_usb_init(int index, enum usb_init_type init) } #endif /* CONFIG_USB_DWC3_GADGET */ +#else +int board_usb_init(int index, enum usb_init_type init) +{ + return __board_usb_init(&dwc3_device_data); +} + + #endif /* CONFIG_USB_GADGET */ #if CONFIG_IS_ENABLED(FASTBOOT)