Use the newly-introduced nvkm_firmware functions. Note that this will
change the expected location of firmware files.

Signed-off-by: Alexandre Courbot <[email protected]>
---
 drm/nouveau/nvkm/subdev/bios/shadow.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drm/nouveau/nvkm/subdev/bios/shadow.c 
b/drm/nouveau/nvkm/subdev/bios/shadow.c
index b2557e87afdd..20814fc4dc1a 100644
--- a/drm/nouveau/nvkm/subdev/bios/shadow.c
+++ b/drm/nouveau/nvkm/subdev/bios/shadow.c
@@ -24,6 +24,7 @@
 #include "priv.h"
 
 #include <core/option.h>
+#include <core/firmware.h>
 #include <subdev/bios.h>
 #include <subdev/bios/image.h>
 
@@ -143,9 +144,9 @@ shadow_fw_read(void *data, u32 offset, u32 length, struct 
nvkm_bios *bios)
 static void *
 shadow_fw_init(struct nvkm_bios *bios, const char *name)
 {
-       struct device *dev = bios->subdev.device->dev;
+       struct nvkm_device *device = bios->subdev.device;
        const struct firmware *fw;
-       int ret = request_firmware(&fw, name, dev);
+       int ret = nvkm_firmware_get(device, name, &fw);
        if (ret)
                return ERR_PTR(-ENOENT);
        return (void *)fw;
@@ -155,7 +156,7 @@ static const struct nvbios_source
 shadow_fw = {
        .name = "firmware",
        .init = shadow_fw_init,
-       .fini = (void(*)(void *))release_firmware,
+       .fini = (void(*)(void *))nvkm_firmware_put,
        .read = shadow_fw_read,
        .rw = false,
 };
-- 
2.7.0

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to