Merge branch 'linux-2.6'
[powerpc.git] / drivers / char / drm / mga_drv.c
index 93f171e..be49dbb 100644 (file)
@@ -29,7 +29,6 @@
  *    Gareth Hughes <gareth@valinux.com>
  */
 
-#include <linux/config.h>
 #include "drmP.h"
 #include "drm.h"
 #include "mga_drm.h"
@@ -48,6 +47,7 @@ static struct drm_driver driver = {
            DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA |
            DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED |
            DRIVER_IRQ_VBL,
+       .dev_priv_size = sizeof(drm_mga_buf_priv_t),
        .load = mga_driver_load,
        .unload = mga_driver_unload,
        .lastclose = mga_driver_lastclose,
@@ -131,7 +131,7 @@ static int mga_driver_device_is_agp(drm_device_t * dev)
         * device.
         */
 
-       if ((pdev->device == 0x0525)
+       if ((pdev->device == 0x0525) && pdev->bus->self
            && (pdev->bus->self->vendor == 0x3388)
            && (pdev->bus->self->device == 0x0021)) {
                return 0;