Commit cdfe5ed0f271f1d5693fbd68809cc7e0e6c3af66
Committed by
David Woodhouse
1 parent
4a42243886
Exists in
master
and in
20 other branches
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: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Showing 1 changed file with 0 additions and 7 deletions Side-by-side Diff
drivers/mtd/lpddr/lpddr_cmds.c
... | ... | @@ -70,19 +70,12 @@ |
70 | 70 | mtd->erase = lpddr_erase; |
71 | 71 | mtd->write = lpddr_write_buffers; |
72 | 72 | mtd->writev = lpddr_writev; |
73 | - mtd->read_oob = NULL; | |
74 | - mtd->write_oob = NULL; | |
75 | - mtd->sync = NULL; | |
76 | 73 | mtd->lock = lpddr_lock; |
77 | 74 | mtd->unlock = lpddr_unlock; |
78 | - mtd->suspend = NULL; | |
79 | - mtd->resume = NULL; | |
80 | 75 | if (map_is_linear(map)) { |
81 | 76 | mtd->point = lpddr_point; |
82 | 77 | mtd->unpoint = lpddr_unpoint; |
83 | 78 | } |
84 | - mtd->block_isbad = NULL; | |
85 | - mtd->block_markbad = NULL; | |
86 | 79 | mtd->size = 1 << lpddr->qinfo->DevSizeShift; |
87 | 80 | mtd->erasesize = 1 << lpddr->qinfo->UniformBlockSizeShift; |
88 | 81 | mtd->writesize = 1 << lpddr->qinfo->BufSizeShift; |