drm/nouveau: Start using new drm_dev initialization helpers
authorLyude Paul <lyude@redhat.com>
Thu, 23 Aug 2018 01:40:07 +0000 (21:40 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 10 Oct 2018 23:54:10 +0000 (09:54 +1000)
commitcfea88a4d86632f28cf80be97079f131645b7869
tree77565e8130533e671db866ad4c8c9c0a4efdcca5
parentc4cee69a4497d9c6ad8868d63568b30e50cac9e9
drm/nouveau: Start using new drm_dev initialization helpers

Per the documentation in drm_get_pci_dev(), this function is deprecated
and shouldn't be used anymore. As it turns out, we're going to need to
stop using drm_get_pci_dev() anyway in order to allow us to turn off the
card before full system shutdowns, otherwise we'll hit race conditions
with userspace while trying to tear down the card on shutdown.

So, start using drm_dev_get() and drm_dev_put(), and just turn our
load/unload callbacks into open coded init/fini() functions.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_drm.c