@@ -873,7 +873,7 @@ static int intel_load_vbt_firmware(struct drm_i915_private *dev_priv)
return ret;
}
-int intel_opregion_setup(struct drm_i915_private *dev_priv)
+static int intel_opregion_setup(struct drm_i915_private *dev_priv)
{
struct intel_opregion *opregion = &dev_priv->opregion;
struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev);
@@ -1232,3 +1232,13 @@ void intel_opregion_unregister(struct drm_i915_private *i915)
opregion->vbt = NULL;
opregion->lid_state = NULL;
}
+
+/**
+ * intel_opregion_init() - Init ACPI opregion.
+ * @i915 i915 device priv data.
+ * opregion init wrapper function, which encapsulate intel_opregion_setup.
+ */
+int intel_opregion_init(struct drm_i915_private *i915)
+{
+ return intel_opregion_setup(i915);
+}
@@ -59,7 +59,7 @@ struct intel_opregion {
#ifdef CONFIG_ACPI
-int intel_opregion_setup(struct drm_i915_private *dev_priv);
+int intel_opregion_init(struct drm_i915_private *i915);
void intel_opregion_register(struct drm_i915_private *dev_priv);
void intel_opregion_unregister(struct drm_i915_private *dev_priv);
@@ -78,7 +78,7 @@ struct edid *intel_opregion_get_edid(struct intel_connector *connector);
#else /* CONFIG_ACPI*/
-static inline int intel_opregion_setup(struct drm_i915_private *dev_priv)
+static inline int intel_opregion_init(struct drm_i915_private *i915)
{
return 0;
}
@@ -637,7 +637,7 @@ static int i915_driver_hw_probe(struct drm_i915_private *dev_priv)
if (ret)
goto err_msi;
- intel_opregion_setup(dev_priv);
+ intel_opregion_init(dev_priv);
ret = intel_pcode_init(dev_priv);
if (ret)
Adding intel_opregion_init() wrapper function, which encapsulates intel_opregion_setup() and will be used for other opregion specific initialization. Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> --- drivers/gpu/drm/i915/display/intel_opregion.c | 12 +++++++++++- drivers/gpu/drm/i915/display/intel_opregion.h | 4 ++-- drivers/gpu/drm/i915/i915_driver.c | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-)