diff options
author | Olof Johansson <olof@lixom.net> | 2012-11-06 06:09:38 -0800 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-11-06 06:09:38 -0800 |
commit | 98fb96aaad39f5ec1f111b591f55e5df0de28622 (patch) | |
tree | 2fe3fd0f8847f9e270450cb935d02e2a7b15936e | |
parent | eb045078140a44a4795fdf1fe9409f57a860a0aa (diff) | |
parent | 5a6a86121f55681b5ae7891d19a462883635beef (diff) | |
download | talos-obmc-linux-98fb96aaad39f5ec1f111b591f55e5df0de28622.tar.gz talos-obmc-linux-98fb96aaad39f5ec1f111b591f55e5df0de28622.zip |
Merge tag 'davinci-for-v3.8/fixes' of git://gitorious.org/linux-davinci/linux-davinci into next/fixes-non-critical
From Sekhar Nori:
These changes include a fix in uncompress.h which is
triggered only when using DT and other fixes found
by automated scripts and a correction in comment text.
* tag 'davinci-for-v3.8/fixes' of git://gitorious.org/linux-davinci/linux-davinci:
ARM: davinci: fix return value check by using IS_ERR in tnetv107x_devices_init()
ARM: davinci: uncompress.h: bail out if uart not initialized
ARM: davinci: serial.h: fix uart number in the comment
ARM: davinci: dm644x evm: move pointer dereference below NULL check
-rw-r--r-- | arch/arm/mach-davinci/board-dm644x-evm.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-davinci/devices-tnetv107x.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/serial.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/uncompress.h | 6 |
4 files changed, 11 insertions, 4 deletions
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index f22572cee49d..f8a99ee6bffc 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -519,13 +519,11 @@ static int dm6444evm_msp430_get_pins(void) char buf[4]; struct i2c_msg msg[2] = { { - .addr = dm6446evm_msp->addr, .flags = 0, .len = 2, .buf = (void __force *)txbuf, }, { - .addr = dm6446evm_msp->addr, .flags = I2C_M_RD, .len = 4, .buf = buf, @@ -536,6 +534,9 @@ static int dm6444evm_msp430_get_pins(void) if (!dm6446evm_msp) return -ENXIO; + msg[0].addr = dm6446evm_msp->addr; + msg[1].addr = dm6446evm_msp->addr; + /* Command 4 == get input state, returns port 2 and port3 data * S Addr W [A] len=2 [A] cmd=4 [A] * RS Addr R [A] [len=4] A [cmd=4] A [port2] A [port3] N P diff --git a/arch/arm/mach-davinci/devices-tnetv107x.c b/arch/arm/mach-davinci/devices-tnetv107x.c index 29b17f7d3a5f..773ab07a71a0 100644 --- a/arch/arm/mach-davinci/devices-tnetv107x.c +++ b/arch/arm/mach-davinci/devices-tnetv107x.c @@ -374,7 +374,7 @@ void __init tnetv107x_devices_init(struct tnetv107x_device_info *info) * complete sample conversion in time. */ tsc_clk = clk_get(NULL, "sys_tsc_clk"); - if (tsc_clk) { + if (!IS_ERR(tsc_clk)) { error = clk_set_rate(tsc_clk, 5000000); WARN_ON(error < 0); clk_put(tsc_clk); diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index 46b3cd11c3c2..86a01fa6d3fe 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h @@ -38,7 +38,7 @@ #ifndef __ASSEMBLY__ struct davinci_uart_config { - /* Bit field of UARTs present; bit 0 --> UART1 */ + /* Bit field of UARTs present; bit 0 --> UART0 */ unsigned int enabled_uarts; }; diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h index 18cfd4977155..3a0ff905a69b 100644 --- a/arch/arm/mach-davinci/include/mach/uncompress.h +++ b/arch/arm/mach-davinci/include/mach/uncompress.h @@ -32,6 +32,9 @@ u32 *uart; /* PORT_16C550A, in polled non-fifo mode */ static void putc(char c) { + if (!uart) + return; + while (!(uart[UART_LSR] & UART_LSR_THRE)) barrier(); uart[UART_TX] = c; @@ -39,6 +42,9 @@ static void putc(char c) static inline void flush(void) { + if (!uart) + return; + while (!(uart[UART_LSR] & UART_LSR_THRE)) barrier(); } |