diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2016-12-12 04:57:24 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2016-12-19 04:25:05 -0500 |
commit | d501b12999eb9cdfc488127fabaf794171dd9bbf (patch) | |
tree | 4b97a912c76f6ac6d2cf6c62fc82540d8be47f58 /drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c | |
parent | 84e1d4578fe9de486b367cc22a405f4a299ab17c (diff) |
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/dss/omapdss-boot-init.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c index 136d30484d02..bf626acae271 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c +++ b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c | |||
@@ -119,8 +119,7 @@ static void __init omapdss_omapify_node(struct device_node *node) | |||
119 | 119 | ||
120 | static void __init omapdss_add_to_list(struct device_node *node, bool root) | 120 | static void __init omapdss_add_to_list(struct device_node *node, bool root) |
121 | { | 121 | { |
122 | struct dss_conv_node *n = kmalloc(sizeof(struct dss_conv_node), | 122 | struct dss_conv_node *n = kmalloc(sizeof(*n), GFP_KERNEL); |
123 | GFP_KERNEL); | ||
124 | if (n) { | 123 | if (n) { |
125 | n->node = node; | 124 | n->node = node; |
126 | n->root = root; | 125 | n->root = root; |