From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Date: Sun, 12 Feb 2017 14:55:06 +0100 Subject: [U-Boot] [PATCH] am33xx: board: Refactor USB initialization into separate function In-Reply-To: <20170206223013.28668-1-alex.g@adaptrum.com> References: <20170206223013.28668-1-alex.g@adaptrum.com> Message-ID: <0342fab5-5cfb-203d-00bd-bc72c87ab396@suse.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 06.02.2017 um 23:30 schrieb Alexandru Gagniuc: > diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c > index 190310f..f19e919 100644 > --- a/arch/arm/mach-omap2/am33xx/board.c > +++ b/arch/arm/mach-omap2/am33xx/board.c > @@ -190,11 +190,9 @@ static struct musb_hdrc_platform_data otg1_plat = { > .board_data = &otg1_board_data, > }; > #endif > -#endif > > -int arch_misc_init(void) > +static int arch_usb_init(void) > { > -#ifndef CONFIG_DM_USB > #ifdef CONFIG_AM335X_USB0 > musb_register(&otg0_plat, &otg0_board_data, > (void *)USB0_OTG_BASE); > @@ -203,7 +201,13 @@ int arch_misc_init(void) > musb_register(&otg1_plat, &otg1_board_data, > (void *)USB1_OTG_BASE); > #endif > -#else > + return 0; > +} > + > +#else /* CONFIG_USB_MUSB_* && CONFIG_AM335X_USB* && !CONFIG_DM_USB */ > + > +int static int arch_usb_init(void)(void) This looks like a copy&paste gone wrong. Regards, Andreas > +{ > struct udevice *dev; > int ret; > > @@ -211,6 +215,19 @@ int arch_misc_init(void) > if (ret || !dev) > return ret; > > + return 0; > +} > + > +#endif /* CONFIG_USB_MUSB_* && CONFIG_AM335X_USB* && !CONFIG_DM_USB */ [snip] -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)