lkml.org 
[lkml]   [2005]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2.6.11-rc5-mm1] serial: update vr41xx_siu
This patch updates serial driver for VR41xx serial unit.
Some check are added to verify_port.

Yoichi

Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>

diff -urN -X dontdiff a-orig/drivers/serial/vr41xx_siu.c a/drivers/serial/vr41xx_siu.c
--- a-orig/drivers/serial/vr41xx_siu.c Wed Mar 2 01:04:39 2005
+++ a/drivers/serial/vr41xx_siu.c Wed Mar 2 07:40:25 2005
@@ -702,15 +702,17 @@
static int siu_request_port(struct uart_port *port)
{
unsigned long size;
+ struct resource *res;

size = siu_port_size(port);
- if (request_mem_region(port->mapbase, size, siu_type_name(port)) == NULL)
+ res = request_mem_region(port->mapbase, size, siu_type_name(port));
+ if (res == NULL)
return -EBUSY;

if (port->flags & UPF_IOREMAP) {
port->membase = ioremap(port->mapbase, size);
if (port->membase == NULL) {
- release_mem_region(port->mapbase, size);
+ release_resource(res);
return -ENOMEM;
}
}
@@ -729,6 +731,12 @@
static int siu_verify_port(struct uart_port *port, struct serial_struct *serial)
{
if (port->type != PORT_VR41XX_SIU && port->type != PORT_VR41XX_DSIU)
+ return -EINVAL;
+ if (port->irq != serial->irq)
+ return -EINVAL;
+ if (port->iotype != serial->io_type)
+ return -EINVAL;
+ if (port->mapbase != (unsigned long)serial->iomem_base)
return -EINVAL;

return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.032 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site