Browse Source

nouveau: fix powerpc build

Reported-by: Ilia Mirkin on irc.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie 10 years ago
parent
commit
4b9e78bd9f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c

+ 2 - 2
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c

@@ -21,7 +21,7 @@
  *
  *
  */
  */
 #include "priv.h"
 #include "priv.h"
-
+#include <core/pci.h>
 
 
 #if defined(__powerpc__)
 #if defined(__powerpc__)
 struct priv {
 struct priv {
@@ -43,7 +43,7 @@ of_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios)
 static void *
 static void *
 of_init(struct nvkm_bios *bios, const char *name)
 of_init(struct nvkm_bios *bios, const char *name)
 {
 {
-	struct pci_dev *pdev = bios->subdev.device->pdev;
+	struct pci_dev *pdev = bios->subdev.device->func->pci(bios->subdev.device)->pdev;
 	struct device_node *dn;
 	struct device_node *dn;
 	struct priv *priv;
 	struct priv *priv;
 	if (!(dn = pci_device_to_OF_node(pdev)))
 	if (!(dn = pci_device_to_OF_node(pdev)))