diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-12-21 19:26:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 17:43:11 -0500 |
commit | 1e091751cdb2c28f9f25041be0dcb4d33e4a833d (patch) | |
tree | 364819510f0ef782277437d0c98170b46bcde35e /drivers | |
parent | 2a52fcb54fdf4b557730022aefcc794d567591fb (diff) |
serial: fix test of unsigned
The variables were unsigned so the tests did not work.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/msm_serial.c | 6 | ||||
-rw-r--r-- | drivers/serial/timbuart.c | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/serial/msm_serial.c b/drivers/serial/msm_serial.c index b05c5aa02cb4..ecdc0facf7ee 100644 --- a/drivers/serial/msm_serial.c +++ b/drivers/serial/msm_serial.c | |||
@@ -691,6 +691,7 @@ static int __init msm_serial_probe(struct platform_device *pdev) | |||
691 | struct msm_port *msm_port; | 691 | struct msm_port *msm_port; |
692 | struct resource *resource; | 692 | struct resource *resource; |
693 | struct uart_port *port; | 693 | struct uart_port *port; |
694 | int irq; | ||
694 | 695 | ||
695 | if (unlikely(pdev->id < 0 || pdev->id >= UART_NR)) | 696 | if (unlikely(pdev->id < 0 || pdev->id >= UART_NR)) |
696 | return -ENXIO; | 697 | return -ENXIO; |
@@ -711,9 +712,10 @@ static int __init msm_serial_probe(struct platform_device *pdev) | |||
711 | return -ENXIO; | 712 | return -ENXIO; |
712 | port->mapbase = resource->start; | 713 | port->mapbase = resource->start; |
713 | 714 | ||
714 | port->irq = platform_get_irq(pdev, 0); | 715 | irq = platform_get_irq(pdev, 0); |
715 | if (unlikely(port->irq < 0)) | 716 | if (unlikely(irq < 0)) |
716 | return -ENXIO; | 717 | return -ENXIO; |
718 | port->irq = irq; | ||
717 | 719 | ||
718 | platform_set_drvdata(pdev, port); | 720 | platform_set_drvdata(pdev, port); |
719 | 721 | ||
diff --git a/drivers/serial/timbuart.c b/drivers/serial/timbuart.c index 34b31da01d09..7bf10264a6ac 100644 --- a/drivers/serial/timbuart.c +++ b/drivers/serial/timbuart.c | |||
@@ -421,7 +421,7 @@ static struct uart_driver timbuart_driver = { | |||
421 | 421 | ||
422 | static int timbuart_probe(struct platform_device *dev) | 422 | static int timbuart_probe(struct platform_device *dev) |
423 | { | 423 | { |
424 | int err; | 424 | int err, irq; |
425 | struct timbuart_port *uart; | 425 | struct timbuart_port *uart; |
426 | struct resource *iomem; | 426 | struct resource *iomem; |
427 | 427 | ||
@@ -453,11 +453,12 @@ static int timbuart_probe(struct platform_device *dev) | |||
453 | uart->port.mapbase = iomem->start; | 453 | uart->port.mapbase = iomem->start; |
454 | uart->port.membase = NULL; | 454 | uart->port.membase = NULL; |
455 | 455 | ||
456 | uart->port.irq = platform_get_irq(dev, 0); | 456 | irq = platform_get_irq(dev, 0); |
457 | if (uart->port.irq < 0) { | 457 | if (irq < 0) { |
458 | err = -EINVAL; | 458 | err = -EINVAL; |
459 | goto err_register; | 459 | goto err_register; |
460 | } | 460 | } |
461 | uart->port.irq = irq; | ||
461 | 462 | ||
462 | tasklet_init(&uart->tasklet, timbuart_tasklet, (unsigned long)uart); | 463 | tasklet_init(&uart->tasklet, timbuart_tasklet, (unsigned long)uart); |
463 | 464 | ||