summaryrefslogtreecommitdiff
path: root/include/asm-blackfin/mach-bf537
diff options
context:
space:
mode:
authorGraf Yang <graf.yang@analog.com>2008-07-19 11:54:10 +0400
committerBryan Wu <cooloney@kernel.org>2008-07-19 11:54:10 +0400
commitaa3348f461da1df5c583f9916ab80298ddd68eff (patch)
tree6f07141f8bafceead08d413bceaabf4c8eb9112b /include/asm-blackfin/mach-bf537
parent262c3825a9f3eb0f4f30ebb4b1ee57397bcb3ffc (diff)
downloadlinux-aa3348f461da1df5c583f9916ab80298ddd68eff.tar.xz
Blackfin arch: Add return value check in bfin_sir_probe(), remove SSYNC().
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'include/asm-blackfin/mach-bf537')
-rw-r--r--include/asm-blackfin/mach-bf537/bfin_sir.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/include/asm-blackfin/mach-bf537/bfin_sir.h b/include/asm-blackfin/mach-bf537/bfin_sir.h
index 0612d0c9501c..cfd8ad4f1f2c 100644
--- a/include/asm-blackfin/mach-bf537/bfin_sir.h
+++ b/include/asm-blackfin/mach-bf537/bfin_sir.h
@@ -118,16 +118,25 @@ static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port)
#define DRIVER_NAME "bfin_sir"
-static void bfin_sir_hw_init(void)
+static int bfin_sir_hw_init(void)
{
+ int ret = -ENODEV;
#ifdef CONFIG_BFIN_SIR0
- peripheral_request(P_UART0_TX, DRIVER_NAME);
- peripheral_request(P_UART0_RX, DRIVER_NAME);
+ ret = peripheral_request(P_UART0_TX, DRIVER_NAME);
+ if (ret)
+ return ret;
+ ret = peripheral_request(P_UART0_RX, DRIVER_NAME);
+ if (ret)
+ return ret;
#endif
#ifdef CONFIG_BFIN_SIR1
- peripheral_request(P_UART1_TX, DRIVER_NAME);
- peripheral_request(P_UART1_RX, DRIVER_NAME);
+ ret = peripheral_request(P_UART1_TX, DRIVER_NAME);
+ if (ret)
+ return ret;
+ ret = peripheral_request(P_UART1_RX, DRIVER_NAME);
+ if (ret)
+ return ret;
#endif
- SSYNC();
+ return ret;
}