drm/amd/display: Tidy up dce120_clock_source_create()
authorTom St Denis <tom.stdenis@amd.com>
Tue, 16 May 2017 14:22:04 +0000 (10:22 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 22:07:23 +0000 (18:07 -0400)
Also change sizeof to be automatic based on type declaration.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c

index 1276dabfb20892c650d2fb5c6094292111238b1f..ec485353ea4f43d499de6ae9dc334c59832393c8 100644 (file)
@@ -398,13 +398,13 @@ struct clock_source *dce120_clock_source_create(
        bool dp_clk_src)
 {
        struct dce110_clk_src *clk_src =
-               dm_alloc(sizeof(struct dce110_clk_src));
+               dm_alloc(sizeof(*clk_src));
 
        if (!clk_src)
                return NULL;
 
        if (dce110_clk_src_construct(clk_src, ctx, bios, id,
-                       regs, &cs_shift, &cs_mask)) {
+                                    regs, &cs_shift, &cs_mask)) {
                clk_src->base.dp_clk_src = dp_clk_src;
                return &clk_src->base;
        }