summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVatika Harlalka <vatikaharlalka@gmail.com>2015-03-19 02:26:58 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-20 13:28:22 +0100
commit7ef4ec4a653c2fb71d70e5c23bf2f37253b5da01 (patch)
tree25517d1d92e3528d99676f360a9305dbc8031d33 /drivers
parentae89faccc6bae384f10a0efd7fec001e89b15e63 (diff)
Staging: rts5208: Introduce a new variable to shorten line length and increase readability
The variable block_no is introduced so as to shorten line length in the long assignment statement and increase readability. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rts5208/ms.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c
index 7638f802a878..5a9321b4d798 100644
--- a/drivers/staging/rts5208/ms.c
+++ b/drivers/staging/rts5208/ms.c
@@ -2030,6 +2030,8 @@ static int ms_init_l2p_tbl(struct rtsx_chip *chip)
reg_addr = PPBUF_BASE2;
for (i = 0; i < (((ms_card->total_block >> 9) * 10) + 1); i++) {
+ int block_no;
+
retval = rtsx_read_register(chip, reg_addr++, &val1);
if (retval != STATUS_SUCCESS)
TRACE_GOTO(chip, INIT_FAIL);
@@ -2043,7 +2045,9 @@ static int ms_init_l2p_tbl(struct rtsx_chip *chip)
break;
seg_no = defect_block / 512;
- ms_card->segment[seg_no].defect_list[ms_card->segment[seg_no].disable_count++] = defect_block;
+
+ block_no = ms_card->segment[seg_no].disable_count++;
+ ms_card->segment[seg_no].defect_list[block_no] = defect_block;
}
for (i = 0; i < ms_card->segment_cnt; i++) {