diff options
author | Graf Yang <graf.yang@analog.com> | 2008-07-19 15:54:10 +0800 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-07-19 15:54:10 +0800 |
commit | aa3348f461da1df5c583f9916ab80298ddd68eff (patch) | |
tree | 6f07141f8bafceead08d413bceaabf4c8eb9112b /include/asm-blackfin/mach-bf527/bfin_sir.h | |
parent | 262c3825a9f3eb0f4f30ebb4b1ee57397bcb3ffc (diff) | |
download | talos-obmc-linux-aa3348f461da1df5c583f9916ab80298ddd68eff.tar.gz talos-obmc-linux-aa3348f461da1df5c583f9916ab80298ddd68eff.zip |
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-bf527/bfin_sir.h')
-rw-r--r-- | include/asm-blackfin/mach-bf527/bfin_sir.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/include/asm-blackfin/mach-bf527/bfin_sir.h b/include/asm-blackfin/mach-bf527/bfin_sir.h index 0612d0c9501c..cfd8ad4f1f2c 100644 --- a/include/asm-blackfin/mach-bf527/bfin_sir.h +++ b/include/asm-blackfin/mach-bf527/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; } |