Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123905
b: refs/heads/master
c: bdd4915
h: refs/heads/master
i:
  123903: 85b7539
v: v3
  • Loading branch information
Ben Dooks committed Dec 18, 2008
1 parent 1011049 commit 4ac6c44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03d5e77bb6538d3f253e04ddf0dda9b848552589
refs/heads/master: bdd4915a9f05ef6b41b51910b199f2668f20d2ef
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-s3c/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void __init s3c24xx_init_clocks(int xtal)

static int nr_uarts __initdata = 0;

static struct s3c2410_uartcfg uart_cfgs[3];
static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS];

/* s3c24xx_init_uartdevs
*
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/serial/samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ static struct uart_ops s3c24xx_serial_ops = {
static struct uart_driver s3c24xx_uart_drv = {
.owner = THIS_MODULE,
.dev_name = "s3c2410_serial",
.nr = 3,
.nr = CONFIG_SERIAL_SAMSUNG_UARTS,
.cons = S3C24XX_SERIAL_CONSOLE,
.driver_name = S3C24XX_SERIAL_NAME,
.major = S3C24XX_SERIAL_MAJOR,
Expand Down Expand Up @@ -1012,8 +1012,11 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
if (port->mapbase != 0)
return 0;

if (cfg->hwport > 3)
return -EINVAL;
if (cfg->hwport > CONFIG_SERIAL_SAMSUNG_UARTS) {
printk(KERN_ERR "%s: port %d bigger than %d\n", __func__,
cfg->hwport, CONFIG_SERIAL_SAMSUNG_UARTS);
return -ERANGE;
}

/* setup info for port */
port->dev = &platdev->dev;
Expand Down

0 comments on commit 4ac6c44

Please sign in to comment.