Commit 76fd8eb8 authored by Tom St Denis's avatar Tom St Denis Committed by Alex Deucher

drm/amd/display: Tidy up dce120_clock_source_create()

Also change sizeof to be automatic based on type declaration.
Signed-off-by: default avatarTom St Denis <tom.stdenis@amd.com>
Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent cedaf307
...@@ -398,13 +398,13 @@ struct clock_source *dce120_clock_source_create( ...@@ -398,13 +398,13 @@ struct clock_source *dce120_clock_source_create(
bool dp_clk_src) bool dp_clk_src)
{ {
struct dce110_clk_src *clk_src = struct dce110_clk_src *clk_src =
dm_alloc(sizeof(struct dce110_clk_src)); dm_alloc(sizeof(*clk_src));
if (!clk_src) if (!clk_src)
return NULL; return NULL;
if (dce110_clk_src_construct(clk_src, ctx, bios, id, 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; clk_src->base.dp_clk_src = dp_clk_src;
return &clk_src->base; return &clk_src->base;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment