[RFC PATCH 7/9] Serial: sc26xx - simplify port initialisation.

From: Martin Fuzzey
Date: Sat Nov 21 2009 - 08:41:06 EST


Just use a memcpy

Signed-off-by: Martin Fuzzey <mfuzzey@xxxxxxxxx>

---

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]);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/