drm/nouveau: Remove references to struct drm_device.pdev
[sfrench/cifs-2.6.git] / drivers / gpu / drm / nouveau / dispnv04 / dfp.c
index 42687ea2a4ca32fb3a30b37d5bd115c7218f12de..ce3d8c6ef000a4623dca525820f5b46f6401e8b2 100644 (file)
@@ -488,12 +488,13 @@ static void nv04_dfp_update_backlight(struct drm_encoder *encoder, int mode)
 #ifdef __powerpc__
        struct drm_device *dev = encoder->dev;
        struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
+       struct pci_dev *pdev = to_pci_dev(dev->dev);
 
        /* BIOS scripts usually take care of the backlight, thanks
         * Apple for your consistency.
         */
-       if (dev->pdev->device == 0x0174 || dev->pdev->device == 0x0179 ||
-           dev->pdev->device == 0x0189 || dev->pdev->device == 0x0329) {
+       if (pdev->device == 0x0174 || pdev->device == 0x0179 ||
+           pdev->device == 0x0189 || pdev->device == 0x0329) {
                if (mode == DRM_MODE_DPMS_ON) {
                        nvif_mask(device, NV_PBUS_DEBUG_DUALHEAD_CTL, 1 << 31, 1 << 31);
                        nvif_mask(device, NV_PCRTC_GPIO_EXT, 3, 1);