The register macros are the last holdout for implicit dev_priv local variable. Try out what it would mean to stop using it, and require passing i915 as parameter to the register macros. Use gmbus as a nicely isolated playing ground. Jani Nikula (6): drm/i915/gmbus: split out gmbus regs in a separate file drm/i915/gmbus: whitespace cleanup in reg definitions drm/i915/gmbus: add wrapper for gmbus mmio base drm/i915/gmbus: stop using implicit dev_priv in register definitions drm/i915/reg: stop using implicit dev_priv in DSPCLK_GATE_D drm/i915/gmbus: mass dev_priv -> i915 rename .../i915/display/intel_display_power_well.c | 4 +- drivers/gpu/drm/i915/display/intel_gmbus.c | 275 +++++++++--------- .../gpu/drm/i915/display/intel_gmbus_regs.h | 81 ++++++ drivers/gpu/drm/i915/display/intel_overlay.c | 4 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 8 +- drivers/gpu/drm/i915/gvt/edid.c | 3 +- drivers/gpu/drm/i915/i915_reg.h | 65 +---- drivers/gpu/drm/i915/intel_pm.c | 4 +- 8 files changed, 232 insertions(+), 212 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_gmbus_regs.h -- 2.34.1