staging: gma500: fix build errors
authorMarek Belisko <marek.belisko@open-nandra.com>
Thu, 3 Mar 2011 12:38:17 +0000 (12:38 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Mar 2011 21:28:47 +0000 (13:28 -0800)
This patch will fix following compilation error:

drivers/staging/gma500/psb_drv.c:1635: error: unknown field ‘pci_driver’ specified in initializer
drivers/staging/gma500/psb_drv.c:1636: error: unknown field ‘name’ specified in initializer
drivers/staging/gma500/psb_drv.c:1636: warning: initialization from incompatible pointer type
drivers/staging/gma500/psb_drv.c:1637: error: unknown field ‘id_table’ specified in initializer
drivers/staging/gma500/psb_drv.c:1637: warning: excess elements in union initializer
drivers/staging/gma500/psb_drv.c:1637: warning: (near initialization for ‘driver.kdriver’)
drivers/staging/gma500/psb_drv.c:1638: error: unknown field ‘resume’ specified in initializer
drivers/staging/gma500/psb_drv.c:1638: warning: excess elements in union initializer
drivers/staging/gma500/psb_drv.c:1638: warning: (near initialization for ‘driver.kdriver’)
drivers/staging/gma500/psb_drv.c:1639: error: unknown field ‘suspend’ specified in initializer
drivers/staging/gma500/psb_drv.c:1639: warning: excess elements in union initializer
drivers/staging/gma500/psb_drv.c:1639: warning: (near initialization for ‘driver.kdriver’)
drivers/staging/gma500/psb_drv.c:1640: error: unknown field ‘probe’ specified in initializer
drivers/staging/gma500/psb_drv.c:1640: warning: excess elements in union initializer
drivers/staging/gma500/psb_drv.c:1640: warning: (near initialization for ‘driver.kdriver’)
drivers/staging/gma500/psb_drv.c:1641: error: unknown field ‘remove’ specified in initializer
drivers/staging/gma500/psb_drv.c:1641: warning: excess elements in union initializer
drivers/staging/gma500/psb_drv.c:1641: warning: (near initialization for ‘driver.kdriver’)
drivers/staging/gma500/psb_drv.c:1643: error: unknown field ‘driver’ specified in initializer
drivers/staging/gma500/psb_drv.c:1643: warning: excess elements in union initializer
drivers/staging/gma500/psb_drv.c:1643: warning: (near initialization for ‘driver.kdriver’)
drivers/staging/gma500/psb_drv.c: In function ‘psb_init’:
drivers/staging/gma500/psb_drv.c:1664: error: implicit declaration of function ‘drm_init’
drivers/staging/gma500/psb_drv.c: In function ‘psb_exit’:
drivers/staging/gma500/psb_drv.c:1669: error: implicit declaration of function ‘drm_exit’

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/gma500/psb_drv.c

index 090d9a2e60bfe4d653f0e211c026afd7a76b0887..44cd095d286222336ecae265d12ca5cca5935299 100644 (file)
@@ -1601,17 +1601,6 @@ static struct drm_driver driver = {
                 .fasync = drm_fasync,
                 .read = drm_read,
                 },
-       .pci_driver = {
-                      .name = DRIVER_NAME,
-                      .id_table = pciidlist,
-                      .resume = ospm_power_resume,
-                      .suspend = ospm_power_suspend,
-                      .probe = psb_probe,
-                      .remove = psb_remove,
-#ifdef CONFIG_PM
-                       .driver.pm = &psb_pm_ops,
-#endif
-                      },
        .name = DRIVER_NAME,
        .desc = DRIVER_DESC,
        .date = PSB_DRM_DRIVER_DATE,
@@ -1620,6 +1609,18 @@ static struct drm_driver driver = {
        .patchlevel = PSB_DRM_DRIVER_PATCHLEVEL
 };
 
+static struct pci_driver psb_pci_driver = {
+       .name = DRIVER_NAME,
+       .id_table = pciidlist,
+       .resume = ospm_power_resume,
+       .suspend = ospm_power_suspend,
+       .probe = psb_probe,
+       .remove = psb_remove,
+#ifdef CONFIG_PM
+       .driver.pm = &psb_pm_ops,
+#endif
+};
+
 static int psb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        /* MLD Added this from Inaky's patch */
@@ -1630,12 +1631,12 @@ static int psb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 static int __init psb_init(void)
 {
-       return drm_init(&driver);
+       return drm_pci_init(&driver, &psb_pci_driver);
 }
 
 static void __exit psb_exit(void)
 {
-       drm_exit(&driver);
+       drm_pci_exit(&driver, &psb_pci_driver);
 }
 
 late_initcall(psb_init);