Use a temporary value to hold the SD lock status thereby making the code
readable.This also fixes a coding style violation with the braces around
the if block.

Signed-off-by: Hari Prasath Gujulan Elango <hguju...@visteon.com>
---
 drivers/staging/rts5208/sd.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
index a8d657b..2eff625 100644
--- a/drivers/staging/rts5208/sd.c
+++ b/drivers/staging/rts5208/sd.c
@@ -237,6 +237,7 @@ RTY_SEND_CMD:
        }
 
        if ((rsp_type == SD_RSP_TYPE_R1) || (rsp_type == SD_RSP_TYPE_R1b)) {
+               u8 sd_lock_status;
                if ((cmd_idx != SEND_RELATIVE_ADDR) &&
                        (cmd_idx != SEND_IF_COND)) {
                        if (cmd_idx != STOP_TRANSMISSION) {
@@ -246,11 +247,11 @@ RTY_SEND_CMD:
                                }
                        }
 #ifdef SUPPORT_SD_LOCK
-                       if (ptr[1] & 0x7D)
+                       sd_lock_status = 0x7D;
 #else
-                       if (ptr[1] & 0x7F)
+                       sd_lock_status = 0x7F;
 #endif
-                       {
+                       if (ptr[1] & sd_lock_status) {
                                dev_dbg(rtsx_dev(chip), "ptr[1]: 0x%02x\n",
                                        ptr[1]);
                                rtsx_trace(chip);
-- 
1.9.1
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to