aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-27 10:59:04 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:24:48 -0500
commitcdfe5ed0f271f1d5693fbd68809cc7e0e6c3af66 (patch)
tree5eebdd21c7a74274370708e642f687ab5d33945d /drivers
parent4a42243886b87cd28a39b192161767c2af851a55 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/lpddr/lpddr_cmds.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
index 1dca31d9a8b3..536bbceaeaad 100644
--- a/drivers/mtd/lpddr/lpddr_cmds.c
+++ b/drivers/mtd/lpddr/lpddr_cmds.c
@@ -70,19 +70,12 @@ struct mtd_info *lpddr_cmdset(struct map_info *map)
70 mtd->erase = lpddr_erase; 70 mtd->erase = lpddr_erase;
71 mtd->write = lpddr_write_buffers; 71 mtd->write = lpddr_write_buffers;
72 mtd->writev = lpddr_writev; 72 mtd->writev = lpddr_writev;
73 mtd->read_oob = NULL;
74 mtd->write_oob = NULL;
75 mtd->sync = NULL;
76 mtd->lock = lpddr_lock; 73 mtd->lock = lpddr_lock;
77 mtd->unlock = lpddr_unlock; 74 mtd->unlock = lpddr_unlock;
78 mtd->suspend = NULL;
79 mtd->resume = NULL;
80 if (map_is_linear(map)) { 75 if (map_is_linear(map)) {
81 mtd->point = lpddr_point; 76 mtd->point = lpddr_point;
82 mtd->unpoint = lpddr_unpoint; 77 mtd->unpoint = lpddr_unpoint;
83 } 78 }
84 mtd->block_isbad = NULL;
85 mtd->block_markbad = NULL;
86 mtd->size = 1 << lpddr->qinfo->DevSizeShift; 79 mtd->size = 1 << lpddr->qinfo->DevSizeShift;
87 mtd->erasesize = 1 << lpddr->qinfo->UniformBlockSizeShift; 80 mtd->erasesize = 1 << lpddr->qinfo->UniformBlockSizeShift;
88 mtd->writesize = 1 << lpddr->qinfo->BufSizeShift; 81 mtd->writesize = 1 << lpddr->qinfo->BufSizeShift;