Re: [PATCH 6/9] omap4_romusb: allow adding usb-serial when not booting from usb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vicente,

On Sun, Mar 10, 2013 at 12:19:39AM +0100, Vicente Bergas wrote:
> 
> Signed-off-by: Vicente Bergas <vicencb@xxxxxxxxx>
> ---
>  arch/arm/mach-omap/include/mach/omap4_rom_usb.h |  3 +++
>  arch/arm/mach-omap/omap4_rom_usb.c              | 23 +++++++++++------------
>  drivers/serial/serial_omap4_usbboot.c           |  2 ++
>  3 files changed, 16 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/serial/serial_omap4_usbboot.c b/drivers/serial/serial_omap4_usbboot.c
> index f0a2fd1..ee5b19a 100644
> --- a/drivers/serial/serial_omap4_usbboot.c
> +++ b/drivers/serial/serial_omap4_usbboot.c
> @@ -78,6 +78,8 @@ static struct driver_d serial_omap4_usbboot_driver = {
>  
>  static int serial_omap4_usbboot_init(void)
>  {
> +	if (!omap4_usbboot_ready())
> +		return 0;
>  	return platform_driver_register(&serial_omap4_usbboot_driver);
>  }
>  console_initcall(serial_omap4_usbboot_init);

Here you register the driver only when usb boot is ready. It would be
better your register the device only when usb boot is ready. Are you
fine with this? Could you send a follow up patch?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux