[PATCH 6/7] omap: switch to add_generic_device

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Jul 29 09:36:36 EDT 2011


On 09:07 Fri 29 Jul     , Franck JULLIEN wrote:
> Hi Jean-Christophe,
> 
> 2011/7/29 Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> > ---
> >  arch/arm/boards/omap/board-beagle.c    |   30 ++++++------------------------
> >  arch/arm/boards/omap/board-sdp343x.c   |    1 -
> >  arch/arm/mach-omap/devices-gpmc-nand.c |   13 +++----------
> >  3 files changed, 9 insertions(+), 35 deletions(-)
> >
> > diff --git a/arch/arm/boards/omap/board-beagle.c b/arch/arm/boards/omap/board-beagle.c
> > index adf0b94..8f868ad 100644
> > --- a/arch/arm/boards/omap/board-beagle.c
> > +++ b/arch/arm/boards/omap/board-beagle.c
> > @@ -242,14 +242,6 @@ static struct NS16550_plat serial_plat = {
> >        .reg_write = omap_uart_write,
> >  };
> >
> > -static struct device_d beagle_serial_device = {
> > -       .id = -1,
> > -       .name = "serial_ns16550",
> > -       .map_base = OMAP_UART3_BASE,
> > -       .size = 1024,
> > -       .platform_data = (void *)&serial_plat,
> > -};
> > -
> >  /**
> >  * @brief UART serial port initialization - remember to enable COM clocks in
> >  * arch
> > @@ -259,7 +251,8 @@ static struct device_d beagle_serial_device = {
> >  static int beagle_console_init(void)
> >  {
> >        /* Register the serial port */
> > -       return register_device(&beagle_serial_device);
> > +       return !!add_generic_device("serial_ns16550", -1, NULL, OMAP_UART3_BASE, 1024,
> 
> Is this a double "!" in front of add_generic_device ??
yes 1! only

Best Regards,
J.



More information about the barebox mailing list