Commit 4a1e1758 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Nuke skl_wrpll_context_init()

We can trivially replace skl_wrpll_context_init() with a single
designated initializer.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220301173128.6988-2-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent a9708702
...@@ -1333,13 +1333,6 @@ struct skl_wrpll_context { ...@@ -1333,13 +1333,6 @@ struct skl_wrpll_context {
unsigned int p; /* chosen divider */ unsigned int p; /* chosen divider */
}; };
static void skl_wrpll_context_init(struct skl_wrpll_context *ctx)
{
memset(ctx, 0, sizeof(*ctx));
ctx->min_deviation = U64_MAX;
}
/* DCO freq must be within +1%/-6% of the DCO central freq */ /* DCO freq must be within +1%/-6% of the DCO central freq */
#define SKL_DCO_MAX_PDEVIATION 100 #define SKL_DCO_MAX_PDEVIATION 100
#define SKL_DCO_MAX_NDEVIATION 600 #define SKL_DCO_MAX_NDEVIATION 600
...@@ -1522,12 +1515,12 @@ skl_ddi_calculate_wrpll(int clock /* in Hz */, ...@@ -1522,12 +1515,12 @@ skl_ddi_calculate_wrpll(int clock /* in Hz */,
{ even_dividers, ARRAY_SIZE(even_dividers) }, { even_dividers, ARRAY_SIZE(even_dividers) },
{ odd_dividers, ARRAY_SIZE(odd_dividers) }, { odd_dividers, ARRAY_SIZE(odd_dividers) },
}; };
struct skl_wrpll_context ctx; struct skl_wrpll_context ctx = {
.min_deviation = U64_MAX,
};
unsigned int dco, d, i; unsigned int dco, d, i;
unsigned int p0, p1, p2; unsigned int p0, p1, p2;
skl_wrpll_context_init(&ctx);
for (d = 0; d < ARRAY_SIZE(dividers); d++) { for (d = 0; d < ARRAY_SIZE(dividers); d++) {
for (dco = 0; dco < ARRAY_SIZE(dco_central_freq); dco++) { for (dco = 0; dco < ARRAY_SIZE(dco_central_freq); dco++) {
for (i = 0; i < dividers[d].n_dividers; i++) { for (i = 0; i < dividers[d].n_dividers; i++) {
......
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