Commit cdfe5ed0 authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by David Woodhouse

mtd: lpddr: drop unnecessary zeroing

We allocate the "mtd" structure using kzalloc which means we do not have
to initialize unused MTD function pointers to NULL, since it is safe to
assume in Linux that NULL contains all zeroes.
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 4a422438
...@@ -70,19 +70,12 @@ struct mtd_info *lpddr_cmdset(struct map_info *map) ...@@ -70,19 +70,12 @@ struct mtd_info *lpddr_cmdset(struct map_info *map)
mtd->erase = lpddr_erase; mtd->erase = lpddr_erase;
mtd->write = lpddr_write_buffers; mtd->write = lpddr_write_buffers;
mtd->writev = lpddr_writev; mtd->writev = lpddr_writev;
mtd->read_oob = NULL;
mtd->write_oob = NULL;
mtd->sync = NULL;
mtd->lock = lpddr_lock; mtd->lock = lpddr_lock;
mtd->unlock = lpddr_unlock; mtd->unlock = lpddr_unlock;
mtd->suspend = NULL;
mtd->resume = NULL;
if (map_is_linear(map)) { if (map_is_linear(map)) {
mtd->point = lpddr_point; mtd->point = lpddr_point;
mtd->unpoint = lpddr_unpoint; mtd->unpoint = lpddr_unpoint;
} }
mtd->block_isbad = NULL;
mtd->block_markbad = NULL;
mtd->size = 1 << lpddr->qinfo->DevSizeShift; mtd->size = 1 << lpddr->qinfo->DevSizeShift;
mtd->erasesize = 1 << lpddr->qinfo->UniformBlockSizeShift; mtd->erasesize = 1 << lpddr->qinfo->UniformBlockSizeShift;
mtd->writesize = 1 << lpddr->qinfo->BufSizeShift; mtd->writesize = 1 << lpddr->qinfo->BufSizeShift;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment