diff options
author | Joe Perches <joe@perches.com> | 2011-05-28 10:36:31 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-28 13:23:57 -0700 |
commit | fcfd8ac0a599dc99eb67259ed809312dc8c4df51 (patch) | |
tree | cf90f60c8a8f4c943253ee0f3475182ba0a4280f | |
parent | f5a22e91e03e3a8d15e9e20a9005fda73eee684e (diff) | |
download | op-kernel-dev-fcfd8ac0a599dc99eb67259ed809312dc8c4df51.zip op-kernel-dev-fcfd8ac0a599dc99eb67259ed809312dc8c4df51.tar.gz |
staging: Convert vmalloc/memset to vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/rts_pstor/ms.c | 3 | ||||
-rw-r--r-- | drivers/staging/rts_pstor/rtsx_chip.c | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/rts_pstor/ms.c b/drivers/staging/rts_pstor/ms.c index 2e82587..66341df 100644 --- a/drivers/staging/rts_pstor/ms.c +++ b/drivers/staging/rts_pstor/ms.c @@ -2064,11 +2064,10 @@ static int ms_init_l2p_tbl(struct rtsx_chip *chip) RTSX_DEBUGP("ms_card->segment_cnt = %d\n", ms_card->segment_cnt); size = ms_card->segment_cnt * sizeof(struct zone_entry); - ms_card->segment = (struct zone_entry *)vmalloc(size); + ms_card->segment = vzalloc(size); if (ms_card->segment == NULL) { TRACE_RET(chip, STATUS_FAIL); } - memset(ms_card->segment, 0, size); retval = ms_read_page(chip, ms_card->boot_block, 1); if (retval != STATUS_SUCCESS) { diff --git a/drivers/staging/rts_pstor/rtsx_chip.c b/drivers/staging/rts_pstor/rtsx_chip.c index 4e60780..5452069 100644 --- a/drivers/staging/rts_pstor/rtsx_chip.c +++ b/drivers/staging/rts_pstor/rtsx_chip.c @@ -1596,18 +1596,16 @@ int rtsx_write_cfg_seq(struct rtsx_chip *chip, u8 func, u16 addr, u8 *buf, int l } RTSX_DEBUGP("dw_len = %d\n", dw_len); - data = (u32 *)vmalloc(dw_len * 4); + data = vzalloc(dw_len * 4); if (!data) { TRACE_RET(chip, STATUS_NOMEM); } - memset(data, 0, dw_len * 4); - mask = (u32 *)vmalloc(dw_len * 4); + mask = vzalloc(dw_len * 4); if (!mask) { vfree(data); TRACE_RET(chip, STATUS_NOMEM); } - memset(mask, 0, dw_len * 4); j = 0; for (i = 0; i < len; i++) { |