Commit 6aed665f authored by Christophe Leroy's avatar Christophe Leroy Committed by Lyude Paul

drm/nouveau/bios: Rename prom_init() and friends functions

While working at fixing powerpc headers, I ended up with the
following error.

	drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c:48:1: error: conflicting types for 'prom_init'; have 'void *(struct nvkm_bios *, const char *)'
	make[5]: *** [scripts/Makefile.build:288: drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.o] Error 1

powerpc and a few other architectures have a prom_init() global function.
One day or another it will conflict with the one in shadowrom.c

Those being static, they can easily be renamed. Do it.

While at it, also rename the ops structure as 'nvbios_prom' instead of
'nvbios_rom' in order to make it clear that it refers to the
NV_PROM device.
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7e0612b61511ec8030e3b2dcbfaa7751781c8b91.1647684507.git.christophe.leroy@csgroup.eu
parent 2292639b
...@@ -19,7 +19,7 @@ struct nvbios_source { ...@@ -19,7 +19,7 @@ struct nvbios_source {
int nvbios_extend(struct nvkm_bios *, u32 length); int nvbios_extend(struct nvkm_bios *, u32 length);
int nvbios_shadow(struct nvkm_bios *); int nvbios_shadow(struct nvkm_bios *);
extern const struct nvbios_source nvbios_rom; extern const struct nvbios_source nvbios_prom;
extern const struct nvbios_source nvbios_ramin; extern const struct nvbios_source nvbios_ramin;
extern const struct nvbios_source nvbios_acpi_fast; extern const struct nvbios_source nvbios_acpi_fast;
extern const struct nvbios_source nvbios_acpi_slow; extern const struct nvbios_source nvbios_acpi_slow;
......
...@@ -171,7 +171,7 @@ nvbios_shadow(struct nvkm_bios *bios) ...@@ -171,7 +171,7 @@ nvbios_shadow(struct nvkm_bios *bios)
struct shadow mthds[] = { struct shadow mthds[] = {
{ 0, &nvbios_of }, { 0, &nvbios_of },
{ 0, &nvbios_ramin }, { 0, &nvbios_ramin },
{ 0, &nvbios_rom }, { 0, &nvbios_prom },
{ 0, &nvbios_acpi_fast }, { 0, &nvbios_acpi_fast },
{ 4, &nvbios_acpi_slow }, { 4, &nvbios_acpi_slow },
{ 1, &nvbios_pcirom }, { 1, &nvbios_pcirom },
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <subdev/pci.h> #include <subdev/pci.h>
static u32 static u32
prom_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios) nvbios_prom_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios)
{ {
struct nvkm_device *device = data; struct nvkm_device *device = data;
u32 i; u32 i;
...@@ -38,14 +38,14 @@ prom_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios) ...@@ -38,14 +38,14 @@ prom_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios)
} }
static void static void
prom_fini(void *data) nvbios_prom_fini(void *data)
{ {
struct nvkm_device *device = data; struct nvkm_device *device = data;
nvkm_pci_rom_shadow(device->pci, true); nvkm_pci_rom_shadow(device->pci, true);
} }
static void * static void *
prom_init(struct nvkm_bios *bios, const char *name) nvbios_prom_init(struct nvkm_bios *bios, const char *name)
{ {
struct nvkm_device *device = bios->subdev.device; struct nvkm_device *device = bios->subdev.device;
if (device->card_type == NV_40 && device->chipset >= 0x4c) if (device->card_type == NV_40 && device->chipset >= 0x4c)
...@@ -55,10 +55,10 @@ prom_init(struct nvkm_bios *bios, const char *name) ...@@ -55,10 +55,10 @@ prom_init(struct nvkm_bios *bios, const char *name)
} }
const struct nvbios_source const struct nvbios_source
nvbios_rom = { nvbios_prom = {
.name = "PROM", .name = "PROM",
.init = prom_init, .init = nvbios_prom_init,
.fini = prom_fini, .fini = nvbios_prom_fini,
.read = prom_read, .read = nvbios_prom_read,
.rw = false, .rw = false,
}; };
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