Commit b01558e5 authored by Janusz Krzysztofik's avatar Janusz Krzysztofik Committed by Chris Wilson

drm/i915: Rename "_load"/"_unload" to match PCI entry points

Current names of i915_driver_load/unload() functions originate in
legacy DRM stubs.  Reduce nomenclature ambiguity by renaming them to
match their current use as helpers called from PCI entry points.

Suggested by: Chris Wilson <chris@chris-wilson.co.uk>
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-3-janusz.krzysztofik@linux.intel.com
parent b5893ffc
...@@ -1876,17 +1876,17 @@ static void i915_driver_destroy(struct drm_i915_private *i915) ...@@ -1876,17 +1876,17 @@ static void i915_driver_destroy(struct drm_i915_private *i915)
} }
/** /**
* i915_driver_load - setup chip and create an initial config * i915_driver_probe - setup chip and create an initial config
* @pdev: PCI device * @pdev: PCI device
* @ent: matching PCI ID entry * @ent: matching PCI ID entry
* *
* The driver load routine has to do several things: * The driver probe routine has to do several things:
* - drive output discovery via intel_modeset_init() * - drive output discovery via intel_modeset_init()
* - initialize the memory manager * - initialize the memory manager
* - allocate initial config memory * - allocate initial config memory
* - setup the DRM framebuffer with the allocated memory * - setup the DRM framebuffer with the allocated memory
*/ */
int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent) int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{ {
const struct intel_device_info *match_info = const struct intel_device_info *match_info =
(struct intel_device_info *)ent->driver_data; (struct intel_device_info *)ent->driver_data;
...@@ -1952,7 +1952,7 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1952,7 +1952,7 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
return ret; return ret;
} }
void i915_driver_unload(struct drm_device *dev) void i915_driver_remove(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_private *dev_priv = to_i915(dev);
struct pci_dev *pdev = dev_priv->drm.pdev; struct pci_dev *pdev = dev_priv->drm.pdev;
......
...@@ -2396,8 +2396,8 @@ long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); ...@@ -2396,8 +2396,8 @@ long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
#endif #endif
extern const struct dev_pm_ops i915_pm_ops; extern const struct dev_pm_ops i915_pm_ops;
int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent); int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
void i915_driver_unload(struct drm_device *dev); void i915_driver_remove(struct drm_device *dev);
void intel_engine_init_hangcheck(struct intel_engine_cs *engine); void intel_engine_init_hangcheck(struct intel_engine_cs *engine);
void intel_hangcheck_init(struct drm_i915_private *dev_priv); void intel_hangcheck_init(struct drm_i915_private *dev_priv);
......
...@@ -878,7 +878,7 @@ static void i915_pci_remove(struct pci_dev *pdev) ...@@ -878,7 +878,7 @@ static void i915_pci_remove(struct pci_dev *pdev)
if (!dev) /* driver load aborted, nothing to cleanup */ if (!dev) /* driver load aborted, nothing to cleanup */
return; return;
i915_driver_unload(dev); i915_driver_remove(dev);
drm_dev_put(dev); drm_dev_put(dev);
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
...@@ -953,7 +953,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -953,7 +953,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (vga_switcheroo_client_probe_defer(pdev)) if (vga_switcheroo_client_probe_defer(pdev))
return -EPROBE_DEFER; return -EPROBE_DEFER;
err = i915_driver_load(pdev, ent); err = i915_driver_probe(pdev, ent);
if (err) if (err)
return err; return err;
......
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