diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-30 10:04:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-30 10:04:01 -0700 |
commit | f54496f55a729078e9eef90bf9e0783857a27db1 (patch) | |
tree | 104cf71ea8349a35990a9d3b58679229a604df31 /drivers | |
parent | aa2d3322989d8fd40fb2e417142c9a029d7831a4 (diff) | |
parent | cdea460643072e1ee3647434aa254b5b81364f68 (diff) | |
download | linux-f54496f55a729078e9eef90bf9e0783857a27db1.tar.bz2 |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] Fix some section mismatch warnings
[ARM] 4417/1: Serial: Fix AMBA drivers locking
[ARM] 4394/1: ARMv7: Add the TLB range operations
[ARM] 4410/1: Remove extern declarations in coyote/ixdpg425-pci.c
[ARM] 4416/1: NWFPE: fix undeclared symbols
[ARM] 4415/1: AML5900: fix sparse warnings from map_io
[ARM] 4414/1: S3C2443: sparse fix for clock.c
[ARM] 4412/1: S3C2412: reset errata fix
[ARM] 4411/1: KS8695: Another serial driver fix
[ARM] oprofile: avoid lockdep warnings on mpcore oprofile init
[ARM] Fix stacktrace FP range checking
[ARM] use __used attribute
[ARM] enable arbitary speed tty ioctls and split input/output speed
[ARM] remove unused header file: arch/arm/mach-s3c2410/bast.h
[ARM] 4406/1: Trivial NSLU2 / NAS-100D header & setup code cleanup
[ARM] 4405/1: NSLU2, DSM-G600 frequency fixup code
[ARM] 4404/1: Trivial IXP42x Kconfig cleanup
[ARM] 4403/1: Make the PXA-I2C driver work with lockdep validator
[ARM] 4402/1: S3C2443: Add physical address of HSMMC controller
[ARM] 4401/1: S3C2443: Add definitions for port GPIOJ
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 23 | ||||
-rw-r--r-- | drivers/input/serio/sa1111ps2.c | 4 | ||||
-rw-r--r-- | drivers/serial/amba-pl010.c | 3 | ||||
-rw-r--r-- | drivers/serial/amba-pl011.c | 3 | ||||
-rw-r--r-- | drivers/serial/serial_ks8695.c | 2 |
5 files changed, 16 insertions, 19 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 8a0a99b93641..28e7b91a4553 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -837,20 +837,10 @@ static const struct i2c_algorithm i2c_pxa_algorithm = { .functionality = i2c_pxa_functionality, }; -static struct pxa_i2c i2c_pxa = { - .lock = __SPIN_LOCK_UNLOCKED(i2c_pxa.lock), - .adap = { - .owner = THIS_MODULE, - .algo = &i2c_pxa_algorithm, - .name = "pxa2xx-i2c.0", - .retries = 5, - }, -}; - #define res_len(r) ((r)->end - (r)->start + 1) static int i2c_pxa_probe(struct platform_device *dev) { - struct pxa_i2c *i2c = &i2c_pxa; + struct pxa_i2c *i2c; struct resource *res; struct i2c_pxa_platform_data *plat = dev->dev.platform_data; int ret; @@ -864,15 +854,20 @@ static int i2c_pxa_probe(struct platform_device *dev) if (!request_mem_region(res->start, res_len(res), res->name)) return -ENOMEM; - i2c = kmalloc(sizeof(struct pxa_i2c), GFP_KERNEL); + i2c = kzalloc(sizeof(struct pxa_i2c), GFP_KERNEL); if (!i2c) { ret = -ENOMEM; goto emalloc; } - memcpy(i2c, &i2c_pxa, sizeof(struct pxa_i2c)); + i2c->adap.owner = THIS_MODULE; + i2c->adap.algo = &i2c_pxa_algorithm; + i2c->adap.retries = 5; + + spin_lock_init(&i2c->lock); init_waitqueue_head(&i2c->wait); - i2c->adap.name[strlen(i2c->adap.name) - 1] = '0' + dev->id % 10; + + sprintf(i2c->adap.name, "pxa_i2c-i2c.%u", dev->id); i2c->reg_base = ioremap(res->start, res_len(res)); if (!i2c->reg_base) { diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c index 559508795af1..d31ece8f68e9 100644 --- a/drivers/input/serio/sa1111ps2.c +++ b/drivers/input/serio/sa1111ps2.c @@ -170,7 +170,7 @@ static void ps2_close(struct serio *io) /* * Clear the input buffer. */ -static void __init ps2_clear_input(struct ps2if *ps2if) +static void __devinit ps2_clear_input(struct ps2if *ps2if) { int maxread = 100; @@ -228,7 +228,7 @@ static int __init ps2_test(struct ps2if *ps2if) /* * Add one device to this driver. */ -static int ps2_probe(struct sa1111_dev *dev) +static int __devinit ps2_probe(struct sa1111_dev *dev) { struct ps2if *ps2if; struct serio *serio; diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 1a9a24b82636..00d1255e4c12 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c @@ -167,8 +167,9 @@ static void pl010_rx_chars(struct uart_amba_port *uap) ignore_char: status = readb(uap->port.membase + UART01x_FR); } + spin_unlock(&port->lock); tty_flip_buffer_push(tty); - return; + spin_lock(&port->lock); } static void pl010_tx_chars(struct uart_amba_port *uap) diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 44639e71372a..954073c6ce3a 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c @@ -153,8 +153,9 @@ static void pl011_rx_chars(struct uart_amba_port *uap) ignore_char: status = readw(uap->port.membase + UART01x_FR); } + spin_unlock(&uap->port.lock); tty_flip_buffer_push(tty); - return; + spin_lock(&uap->port.lock); } static void pl011_tx_chars(struct uart_amba_port *uap) diff --git a/drivers/serial/serial_ks8695.c b/drivers/serial/serial_ks8695.c index 698763b28ddd..8721afe1ae4f 100644 --- a/drivers/serial/serial_ks8695.c +++ b/drivers/serial/serial_ks8695.c @@ -589,7 +589,7 @@ static int __init ks8695_console_setup(struct console *co, char *options) return uart_set_options(port, co, baud, parity, bits, flow); } -extern struct uart_driver ks8695_reg; +static struct uart_driver ks8695_reg; static struct console ks8695_console = { .name = SERIAL_KS8695_DEVNAME, |