lkml.org 
[lkml]   [2009]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH 7/9] Serial: sc26xx - simplify port initialisation.
    Date
    Just use a memcpy

    Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>

    ---

    drivers/serial/sc26xx.c | 11 +----------
    1 files changed, 1 insertions(+), 10 deletions(-)

    diff --git a/drivers/serial/sc26xx.c b/drivers/serial/sc26xx.c
    index 316d110..69b7ae7 100644
    --- a/drivers/serial/sc26xx.c
    +++ b/drivers/serial/sc26xx.c
    @@ -680,17 +680,8 @@ static int __devinit sc26xx_probe(struct platform_device *dev)

    sc26xx_port = &up->port[0];

    + memcpy(&up->port[1], &up->port[0], sizeof(up->port[0]));
    up->port[1].line = 1;
    - up->port[1].ops = &sc26xx_ops;
    - up->port[1].type = PORT_SC26XX;
    - up->port[1].uartclk = (29491200 / 16); /* arbitrary */
    -
    - up->port[1].mapbase = up->port[0].mapbase;
    - up->port[1].membase = up->port[0].membase;
    - up->port[1].iotype = UPIO_MEM;
    - up->port[1].irq = up->port[0].irq;
    -
    - up->port[1].dev = &dev->dev;

    sc26xx_init_masks(up, 1, sc26xx_data[1]);



    \
     
     \ /
      Last update: 2009-11-21 14:45    [W:0.022 / U:0.488 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site