diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2016-12-12 12:57:24 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2016-12-19 12:25:05 +0300 |
commit | d501b12999eb9cdfc488127fabaf794171dd9bbf (patch) | |
tree | 4b97a912c76f6ac6d2cf6c62fc82540d8be47f58 /drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | |
parent | 84e1d4578fe9de486b367cc22a405f4a299ab17c (diff) | |
download | linux-d501b12999eb9cdfc488127fabaf794171dd9bbf.tar.xz |
drm: omapdrm: Use sizeof(*var) instead of sizeof(type) for structures
By linking the sizeof to a variable type the code will be less prone to
bugs due to future type changes of variables.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_dmm_tiler.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c index 4ceed7a9762f..3cab06661a08 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -224,7 +224,7 @@ static void dmm_txn_append(struct dmm_txn *txn, struct pat_area *area, int rows = (1 + area->y1 - area->y0); int i = columns*rows; - pat = alloc_dma(txn, sizeof(struct pat), &pat_pa); + pat = alloc_dma(txn, sizeof(*pat), &pat_pa); if (txn->last_pat) txn->last_pat->next_pa = (uint32_t)pat_pa; @@ -735,7 +735,7 @@ static int omap_dmm_probe(struct platform_device *dev) /* alloc engines */ omap_dmm->engines = kcalloc(omap_dmm->num_engines, - sizeof(struct refill_engine), GFP_KERNEL); + sizeof(*omap_dmm->engines), GFP_KERNEL); if (!omap_dmm->engines) { ret = -ENOMEM; goto fail; |