mirror of
https://github.com/torvalds/linux.git
synced 2026-04-28 19:42:31 -04:00
drm/i915: Constify power well descriptors
It makes sense to keep unchanging data const. Extract such fields from the i915_power_well struct into a new i915_power_well_desc struct that we initialize during compile time. For the rest of the dynamic fields allocate an array of i915_power_well objects in i915 dev_priv, and link to each of these objects their corresponding i915_power_well_desc object. v2: - Fix checkpatch warnings about missing param name in fn declaration and lines over 80 chars. (Paulo) - Move check for unique IDs to __set_power_wells(). Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> [Fixed checkpatch warn in __set_power_wells()] Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-5-imre.deak@intel.com
This commit is contained in:
@@ -2845,10 +2845,10 @@ static int i915_power_domain_info(struct seq_file *m, void *unused)
|
||||
enum intel_display_power_domain power_domain;
|
||||
|
||||
power_well = &power_domains->power_wells[i];
|
||||
seq_printf(m, "%-25s %d\n", power_well->name,
|
||||
seq_printf(m, "%-25s %d\n", power_well->desc->name,
|
||||
power_well->count);
|
||||
|
||||
for_each_power_domain(power_domain, power_well->domains)
|
||||
for_each_power_domain(power_domain, power_well->desc->domains)
|
||||
seq_printf(m, " %-23s %d\n",
|
||||
intel_display_power_domain_str(power_domain),
|
||||
power_domains->domain_use_count[power_domain]);
|
||||
|
||||
Reference in New Issue
Block a user