Commit 78dae1ac authored by Janusz Krzysztofik's avatar Janusz Krzysztofik Committed by Chris Wilson

drm/i915: Propagate "_remove" function name suffix down

Similar to the "_release" case, consistently replace mixed
"_cleanup"/"_fini"/"_fini_hw" components found in names of functions
called from i915_driver_remove() with "_remove" or "_driver_remove"
suffixes for better code readability.
Signed-off-by: default avatarJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190712112429.740-6-janusz.krzysztofik@linux.intel.com
parent 3b58a945
...@@ -1908,10 +1908,10 @@ void intel_bios_init(struct drm_i915_private *dev_priv) ...@@ -1908,10 +1908,10 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
} }
/** /**
* intel_bios_cleanup - Free any resources allocated by intel_bios_init() * intel_bios_driver_remove - Free any resources allocated by intel_bios_init()
* @dev_priv: i915 device instance * @dev_priv: i915 device instance
*/ */
void intel_bios_cleanup(struct drm_i915_private *dev_priv) void intel_bios_driver_remove(struct drm_i915_private *dev_priv)
{ {
kfree(dev_priv->vbt.child_dev); kfree(dev_priv->vbt.child_dev);
dev_priv->vbt.child_dev = NULL; dev_priv->vbt.child_dev = NULL;
......
...@@ -228,7 +228,7 @@ struct mipi_pps_data { ...@@ -228,7 +228,7 @@ struct mipi_pps_data {
} __packed; } __packed;
void intel_bios_init(struct drm_i915_private *dev_priv); void intel_bios_init(struct drm_i915_private *dev_priv);
void intel_bios_cleanup(struct drm_i915_private *dev_priv); void intel_bios_driver_remove(struct drm_i915_private *dev_priv);
bool intel_bios_is_valid_vbt(const void *buf, size_t size); bool intel_bios_is_valid_vbt(const void *buf, size_t size);
bool intel_bios_is_tv_present(struct drm_i915_private *dev_priv); bool intel_bios_is_tv_present(struct drm_i915_private *dev_priv);
bool intel_bios_is_lvds_present(struct drm_i915_private *dev_priv, u8 *i2c_pin); bool intel_bios_is_lvds_present(struct drm_i915_private *dev_priv, u8 *i2c_pin);
......
...@@ -17092,7 +17092,7 @@ static void intel_hpd_poll_fini(struct drm_device *dev) ...@@ -17092,7 +17092,7 @@ static void intel_hpd_poll_fini(struct drm_device *dev)
drm_connector_list_iter_end(&conn_iter); drm_connector_list_iter_end(&conn_iter);
} }
void intel_modeset_cleanup(struct drm_device *dev) void intel_modeset_driver_remove(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_private *dev_priv = to_i915(dev);
......
...@@ -4902,7 +4902,7 @@ static void intel_power_domains_verify_state(struct drm_i915_private *dev_priv); ...@@ -4902,7 +4902,7 @@ static void intel_power_domains_verify_state(struct drm_i915_private *dev_priv);
* *
* It will return with power domains disabled (to be enabled later by * It will return with power domains disabled (to be enabled later by
* intel_power_domains_enable()) and must be paired with * intel_power_domains_enable()) and must be paired with
* intel_power_domains_fini_hw(). * intel_power_domains_driver_remove().
*/ */
void intel_power_domains_init_hw(struct drm_i915_private *i915, bool resume) void intel_power_domains_init_hw(struct drm_i915_private *i915, bool resume)
{ {
...@@ -4954,7 +4954,7 @@ void intel_power_domains_init_hw(struct drm_i915_private *i915, bool resume) ...@@ -4954,7 +4954,7 @@ void intel_power_domains_init_hw(struct drm_i915_private *i915, bool resume)
} }
/** /**
* intel_power_domains_fini_hw - deinitialize hw power domain state * intel_power_domains_driver_remove - deinitialize hw power domain state
* @i915: i915 device instance * @i915: i915 device instance
* *
* De-initializes the display power domain HW state. It also ensures that the * De-initializes the display power domain HW state. It also ensures that the
...@@ -4964,7 +4964,7 @@ void intel_power_domains_init_hw(struct drm_i915_private *i915, bool resume) ...@@ -4964,7 +4964,7 @@ void intel_power_domains_init_hw(struct drm_i915_private *i915, bool resume)
* intel_power_domains_disable()) and must be paired with * intel_power_domains_disable()) and must be paired with
* intel_power_domains_init_hw(). * intel_power_domains_init_hw().
*/ */
void intel_power_domains_fini_hw(struct drm_i915_private *i915) void intel_power_domains_driver_remove(struct drm_i915_private *i915)
{ {
intel_wakeref_t wakeref __maybe_unused = intel_wakeref_t wakeref __maybe_unused =
fetch_and_zero(&i915->power_domains.wakeref); fetch_and_zero(&i915->power_domains.wakeref);
......
...@@ -241,7 +241,7 @@ void gen9_enable_dc5(struct drm_i915_private *dev_priv); ...@@ -241,7 +241,7 @@ void gen9_enable_dc5(struct drm_i915_private *dev_priv);
int intel_power_domains_init(struct drm_i915_private *dev_priv); int intel_power_domains_init(struct drm_i915_private *dev_priv);
void intel_power_domains_cleanup(struct drm_i915_private *dev_priv); void intel_power_domains_cleanup(struct drm_i915_private *dev_priv);
void intel_power_domains_init_hw(struct drm_i915_private *dev_priv, bool resume); void intel_power_domains_init_hw(struct drm_i915_private *dev_priv, bool resume);
void intel_power_domains_fini_hw(struct drm_i915_private *dev_priv); void intel_power_domains_driver_remove(struct drm_i915_private *dev_priv);
void icl_display_core_init(struct drm_i915_private *dev_priv, bool resume); void icl_display_core_init(struct drm_i915_private *dev_priv, bool resume);
void icl_display_core_uninit(struct drm_i915_private *dev_priv); void icl_display_core_uninit(struct drm_i915_private *dev_priv);
void intel_power_domains_enable(struct drm_i915_private *dev_priv); void intel_power_domains_enable(struct drm_i915_private *dev_priv);
......
...@@ -757,16 +757,16 @@ static int i915_load_modeset_init(struct drm_device *dev) ...@@ -757,16 +757,16 @@ static int i915_load_modeset_init(struct drm_device *dev)
cleanup_gem: cleanup_gem:
i915_gem_suspend(dev_priv); i915_gem_suspend(dev_priv);
i915_gem_fini_hw(dev_priv); i915_gem_driver_remove(dev_priv);
i915_gem_driver_release(dev_priv); i915_gem_driver_release(dev_priv);
cleanup_modeset: cleanup_modeset:
intel_modeset_cleanup(dev); intel_modeset_driver_remove(dev);
cleanup_irq: cleanup_irq:
intel_irq_uninstall(dev_priv); intel_irq_uninstall(dev_priv);
intel_gmbus_teardown(dev_priv); intel_gmbus_teardown(dev_priv);
cleanup_csr: cleanup_csr:
intel_csr_ucode_fini(dev_priv); intel_csr_ucode_fini(dev_priv);
intel_power_domains_fini_hw(dev_priv); intel_power_domains_driver_remove(dev_priv);
vga_switcheroo_unregister_client(pdev); vga_switcheroo_unregister_client(pdev);
cleanup_vga_client: cleanup_vga_client:
vga_client_register(pdev, NULL, NULL, NULL); vga_client_register(pdev, NULL, NULL, NULL);
...@@ -1698,10 +1698,10 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv) ...@@ -1698,10 +1698,10 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
} }
/** /**
* i915_driver_cleanup_hw - cleanup the setup done in i915_driver_init_hw() * i915_driver_hw_remove - cleanup the setup done in i915_driver_hw_probe()
* @dev_priv: device private * @dev_priv: device private
*/ */
static void i915_driver_cleanup_hw(struct drm_i915_private *dev_priv) static void i915_driver_hw_remove(struct drm_i915_private *dev_priv)
{ {
struct pci_dev *pdev = dev_priv->drm.pdev; struct pci_dev *pdev = dev_priv->drm.pdev;
...@@ -1935,7 +1935,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1935,7 +1935,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return 0; return 0;
out_cleanup_hw: out_cleanup_hw:
i915_driver_cleanup_hw(dev_priv); i915_driver_hw_remove(dev_priv);
i915_ggtt_driver_release(dev_priv); i915_ggtt_driver_release(dev_priv);
/* Paranoia: make sure we have disabled everything before we exit. */ /* Paranoia: make sure we have disabled everything before we exit. */
...@@ -1976,11 +1976,11 @@ void i915_driver_remove(struct drm_device *dev) ...@@ -1976,11 +1976,11 @@ void i915_driver_remove(struct drm_device *dev)
drm_atomic_helper_shutdown(dev); drm_atomic_helper_shutdown(dev);
intel_gvt_cleanup(dev_priv); intel_gvt_driver_remove(dev_priv);
intel_modeset_cleanup(dev); intel_modeset_driver_remove(dev);
intel_bios_cleanup(dev_priv); intel_bios_driver_remove(dev_priv);
vga_switcheroo_unregister_client(pdev); vga_switcheroo_unregister_client(pdev);
vga_client_register(pdev, NULL, NULL, NULL); vga_client_register(pdev, NULL, NULL, NULL);
...@@ -1991,11 +1991,11 @@ void i915_driver_remove(struct drm_device *dev) ...@@ -1991,11 +1991,11 @@ void i915_driver_remove(struct drm_device *dev)
cancel_delayed_work_sync(&dev_priv->gpu_error.hangcheck_work); cancel_delayed_work_sync(&dev_priv->gpu_error.hangcheck_work);
i915_reset_error_state(dev_priv); i915_reset_error_state(dev_priv);
i915_gem_fini_hw(dev_priv); i915_gem_driver_remove(dev_priv);
intel_power_domains_fini_hw(dev_priv); intel_power_domains_driver_remove(dev_priv);
i915_driver_cleanup_hw(dev_priv); i915_driver_hw_remove(dev_priv);
enable_rpm_wakeref_asserts(&dev_priv->runtime_pm); enable_rpm_wakeref_asserts(&dev_priv->runtime_pm);
} }
......
...@@ -2537,7 +2537,7 @@ bool i915_gem_unset_wedged(struct drm_i915_private *dev_priv); ...@@ -2537,7 +2537,7 @@ bool i915_gem_unset_wedged(struct drm_i915_private *dev_priv);
void i915_gem_init_mmio(struct drm_i915_private *i915); void i915_gem_init_mmio(struct drm_i915_private *i915);
int __must_check i915_gem_init(struct drm_i915_private *dev_priv); int __must_check i915_gem_init(struct drm_i915_private *dev_priv);
int __must_check i915_gem_init_hw(struct drm_i915_private *dev_priv); int __must_check i915_gem_init_hw(struct drm_i915_private *dev_priv);
void i915_gem_fini_hw(struct drm_i915_private *dev_priv); void i915_gem_driver_remove(struct drm_i915_private *dev_priv);
void i915_gem_driver_release(struct drm_i915_private *dev_priv); void i915_gem_driver_release(struct drm_i915_private *dev_priv);
int i915_gem_wait_for_idle(struct drm_i915_private *dev_priv, int i915_gem_wait_for_idle(struct drm_i915_private *dev_priv,
unsigned int flags, long timeout); unsigned int flags, long timeout);
...@@ -2693,7 +2693,7 @@ mkwrite_device_info(struct drm_i915_private *dev_priv) ...@@ -2693,7 +2693,7 @@ mkwrite_device_info(struct drm_i915_private *dev_priv)
/* modesetting */ /* modesetting */
void intel_modeset_init_hw(struct drm_device *dev); void intel_modeset_init_hw(struct drm_device *dev);
int intel_modeset_init(struct drm_device *dev); int intel_modeset_init(struct drm_device *dev);
void intel_modeset_cleanup(struct drm_device *dev); void intel_modeset_driver_remove(struct drm_device *dev);
int intel_modeset_vga_set_state(struct drm_i915_private *dev_priv, bool state); int intel_modeset_vga_set_state(struct drm_i915_private *dev_priv, bool state);
void intel_display_resume(struct drm_device *dev); void intel_display_resume(struct drm_device *dev);
void i915_redisable_vga(struct drm_i915_private *dev_priv); void i915_redisable_vga(struct drm_i915_private *dev_priv);
......
...@@ -1600,7 +1600,7 @@ int i915_gem_init(struct drm_i915_private *dev_priv) ...@@ -1600,7 +1600,7 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
return ret; return ret;
} }
void i915_gem_fini_hw(struct drm_i915_private *dev_priv) void i915_gem_driver_remove(struct drm_i915_private *dev_priv)
{ {
GEM_BUG_ON(dev_priv->gt.awake); GEM_BUG_ON(dev_priv->gt.awake);
......
...@@ -122,13 +122,14 @@ int intel_gvt_init(struct drm_i915_private *dev_priv) ...@@ -122,13 +122,14 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)
} }
/** /**
* intel_gvt_cleanup - cleanup GVT components when i915 driver is unloading * intel_gvt_driver_remove - cleanup GVT components when i915 driver is
* unbinding
* @dev_priv: drm i915 private * * @dev_priv: drm i915 private *
* *
* This function is called at the i915 driver unloading stage, to shutdown * This function is called at the i915 driver unloading stage, to shutdown
* GVT components and release the related resources. * GVT components and release the related resources.
*/ */
void intel_gvt_cleanup(struct drm_i915_private *dev_priv) void intel_gvt_driver_remove(struct drm_i915_private *dev_priv)
{ {
if (!intel_gvt_active(dev_priv)) if (!intel_gvt_active(dev_priv))
return; return;
......
...@@ -28,7 +28,7 @@ struct drm_i915_private; ...@@ -28,7 +28,7 @@ struct drm_i915_private;
#ifdef CONFIG_DRM_I915_GVT #ifdef CONFIG_DRM_I915_GVT
int intel_gvt_init(struct drm_i915_private *dev_priv); int intel_gvt_init(struct drm_i915_private *dev_priv);
void intel_gvt_cleanup(struct drm_i915_private *dev_priv); void intel_gvt_driver_remove(struct drm_i915_private *dev_priv);
int intel_gvt_init_device(struct drm_i915_private *dev_priv); int intel_gvt_init_device(struct drm_i915_private *dev_priv);
void intel_gvt_clean_device(struct drm_i915_private *dev_priv); void intel_gvt_clean_device(struct drm_i915_private *dev_priv);
int intel_gvt_init_host(void); int intel_gvt_init_host(void);
...@@ -38,7 +38,8 @@ static inline int intel_gvt_init(struct drm_i915_private *dev_priv) ...@@ -38,7 +38,8 @@ static inline int intel_gvt_init(struct drm_i915_private *dev_priv)
{ {
return 0; return 0;
} }
static inline void intel_gvt_cleanup(struct drm_i915_private *dev_priv)
static inline void intel_gvt_driver_remove(struct drm_i915_private *dev_priv)
{ {
} }
......
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