summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_drm.c
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2015-01-15 15:29:56 +0900
committerBen Skeggs <bskeggs@redhat.com>2015-01-22 12:15:09 +1000
commit055a65d5987a7f246c3fc2297158286882dbdbcf (patch)
treee0659efc5e0857acca5682dc8212c62928dad546 /drivers/gpu/drm/nouveau/nouveau_drm.c
parent4dc63933ea518501fe9cfe6a8f8797d21095e76f (diff)
downloadop-kernel-dev-055a65d5987a7f246c3fc2297158286882dbdbcf.zip
op-kernel-dev-055a65d5987a7f246c3fc2297158286882dbdbcf.tar.gz
drm/nouveau: merge nouveau_platform.ko into nouveau.ko
Having the two modules separated causes various unneeded complications, including having to export symbols accessed between the modules. Make things simpler by compiling platform device support into nouveau.ko. Platform device support remains optional and is only compiled on Tegra. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 65910e3..1118efa 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -52,6 +52,7 @@
#include "nouveau_debugfs.h"
#include "nouveau_usif.h"
#include "nouveau_connector.h"
+#include "nouveau_platform.h"
MODULE_PARM_DESC(config, "option string to pass to driver core");
static char *nouveau_config;
@@ -533,7 +534,6 @@ nouveau_drm_device_remove(struct drm_device *dev)
nouveau_object_ref(NULL, &device);
nouveau_object_debug();
}
-EXPORT_SYMBOL(nouveau_drm_device_remove);
static void
nouveau_drm_remove(struct pci_dev *pdev)
@@ -1083,7 +1083,6 @@ err_free:
return ERR_PTR(err);
}
-EXPORT_SYMBOL(nouveau_platform_device_create_);
static int __init
nouveau_drm_init(void)
@@ -1105,6 +1104,10 @@ nouveau_drm_init(void)
if (!nouveau_modeset)
return 0;
+#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
+ platform_driver_register(&nouveau_platform_driver);
+#endif
+
nouveau_register_dsm_handler();
return drm_pci_init(&driver_pci, &nouveau_drm_pci_driver);
}
@@ -1117,6 +1120,10 @@ nouveau_drm_exit(void)
drm_pci_exit(&driver_pci, &nouveau_drm_pci_driver);
nouveau_unregister_dsm_handler();
+
+#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
+ platform_driver_unregister(&nouveau_platform_driver);
+#endif
}
module_init(nouveau_drm_init);
OpenPOWER on IntegriCloud