From 3464ca68eb1b0e4ed88821c6bfb0d9a88afe5133 Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Fri, 15 Jan 2016 15:39:26 +0900 Subject: bios: use the nvkm_firmware functions Use the newly-introduced nvkm_firmware functions. Note that this will change the expected location of firmware files. Signed-off-by: Alexandre Courbot --- 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 b2557e87a..20814fc4d 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 +#include #include #include @@ -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, }; -- cgit v1.2.1