[PATCH] staging: gma500: Fix compilation error.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 drivers/staging/gma500/psb_drv.c |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/gma500/psb_drv.c b/drivers/staging/gma500/psb_drv.c
index 2fe09c8..caa5140 100644
--- a/drivers/staging/gma500/psb_drv.c
+++ b/drivers/staging/gma500/psb_drv.c
@@ -1632,17 +1632,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,
@@ -1651,6 +1640,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 */
@@ -1661,12 +1662,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);
-- 
1.7.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux