]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Blackfin arch: Add return value check in bfin_sir_probe(), remove SSYNC().
authorGraf Yang <graf.yang@analog.com>
Sat, 19 Jul 2008 07:54:10 +0000 (15:54 +0800)
committerBryan Wu <cooloney@kernel.org>
Sat, 19 Jul 2008 07:54:10 +0000 (15:54 +0800)
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
include/asm-blackfin/mach-bf527/bfin_sir.h
include/asm-blackfin/mach-bf533/bfin_sir.h
include/asm-blackfin/mach-bf537/bfin_sir.h
include/asm-blackfin/mach-bf548/bfin_sir.h
include/asm-blackfin/mach-bf561/bfin_sir.h

index 0612d0c9501c59e3ce990c81dc83f681f40f2a6b..cfd8ad4f1f2c33cc34efc32aba570c09eaac42c0 100644 (file)
@@ -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;
 }
index cefcf8bb505b1aba5d9f0247e1eb15fe6918b135..9bb87e9e2e9b9fb1dc0901d7a2b3e63a19d0b583 100644 (file)
@@ -110,11 +110,16 @@ 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
-       SSYNC();
+       return ret;
 }
index 0612d0c9501c59e3ce990c81dc83f681f40f2a6b..cfd8ad4f1f2c33cc34efc32aba570c09eaac42c0 100644 (file)
@@ -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;
 }
index 5e94271c7e3bd476652981f2391d1b3db90f01c0..c41f9cf00268933c88d55d1cb832695a6036386d 100644 (file)
@@ -124,26 +124,43 @@ struct bfin_sir_self {
 
 #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
 
 #ifdef CONFIG_BFIN_SIR2
-       peripheral_request(P_UART2_TX, DRIVER_NAME);
-       peripheral_request(P_UART2_RX, DRIVER_NAME);
+       ret = peripheral_request(P_UART2_TX, DRIVER_NAME);
+       if (ret)
+               return ret;
+       ret = peripheral_request(P_UART2_RX, DRIVER_NAME);
+       if (ret)
+               return ret;
 #endif
 
 #ifdef CONFIG_BFIN_SIR3
-       peripheral_request(P_UART3_TX, DRIVER_NAME);
-       peripheral_request(P_UART3_RX, DRIVER_NAME);
+       ret = peripheral_request(P_UART3_TX, DRIVER_NAME);
+       if (ret)
+               return ret;
+       ret = peripheral_request(P_UART3_RX, DRIVER_NAME);
+       if (ret)
+               return ret;
 #endif
-       SSYNC();
+       return ret;
 }
index cefcf8bb505b1aba5d9f0247e1eb15fe6918b135..9bb87e9e2e9b9fb1dc0901d7a2b3e63a19d0b583 100644 (file)
@@ -110,11 +110,16 @@ 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
-       SSYNC();
+       return ret;
 }