Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/pmdemand: convert to_intel_pmdemand_state() to a function

In preparation for making struct intel_pmdemand_state an opaque type,
convert to_intel_pmdemand_state() to a function.

Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/10324781f9f7eae5a92506aaa7a40403efd345dd.1735662324.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

+6 -2
+5
drivers/gpu/drm/i915/display/intel_pmdemand.c
··· 15 15 #include "intel_pmdemand.h" 16 16 #include "skl_watermark.h" 17 17 18 + struct intel_pmdemand_state *to_intel_pmdemand_state(struct intel_global_state *obj_state) 19 + { 20 + return container_of(obj_state, struct intel_pmdemand_state, base); 21 + } 22 + 18 23 static struct intel_global_state * 19 24 intel_pmdemand_duplicate_state(struct intel_global_obj *obj) 20 25 {
+1 -2
drivers/gpu/drm/i915/display/intel_pmdemand.h
··· 43 43 struct pmdemand_params params; 44 44 }; 45 45 46 - #define to_intel_pmdemand_state(global_state) \ 47 - container_of_const((global_state), struct intel_pmdemand_state, base) 46 + struct intel_pmdemand_state *to_intel_pmdemand_state(struct intel_global_state *obj_state); 48 47 49 48 void intel_pmdemand_init_early(struct drm_i915_private *i915); 50 49 int intel_pmdemand_init(struct drm_i915_private *i915);