summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2004-10-23 04:21:27 +0000
committerJon Smirl <jonsmirl@yahoo.com>2004-10-23 04:21:27 +0000
commit9ea6fe7aa6ba27cc7003c9cd141e9146a492416d (patch)
tree96f7d7871f782a5ed8932194aca0a62c89f06e13 /linux-core
parentad87dd8427b6142c42d7b97c7a4170c89b6728ec (diff)
Prepare to eliminate inter_module_get("agp")
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_drv.c18
-rw-r--r--linux-core/drm_stub.c2
-rw-r--r--linux-core/radeon_i2c.c2
3 files changed, 17 insertions, 5 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index b59b5ca5..7673aaa3 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -463,6 +463,8 @@ static struct file_operations drm_stub_fops = {
.open = drm_stub_open
};
+static int use_inter_module = 0;
+
static int __init drm_core_init(void)
{
int ret = -ENOMEM;
@@ -489,7 +491,12 @@ static int __init drm_core_init(void)
ret = -1;
goto err_p3;
}
- drm_agp = (drm_agp_t *) inter_module_get("drm_agp");
+ drm_agp = symbol_get(drm_agp_entry);
+ if (!drm_agp) {
+ drm_agp = inter_module_get("agp");
+ use_inter_module = 1;
+ }
+ DRM_DEBUG("drm_agp %p\n", drm_agp);
DRM_INFO("Initialized %s %d.%d.%d %s\n",
DRIVER_NAME,
@@ -506,9 +513,12 @@ err_p1:
static void __exit drm_core_exit(void)
{
- if (drm_agp)
- inter_module_put("drm_agp");
-
+ if (drm_agp) {
+ if (use_inter_module)
+ inter_module_put("agp");
+ else
+ symbol_put(drm_agp_entry);
+ }
remove_proc_entry("dri", NULL);
drm_sysfs_destroy(drm_class);
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c
index c9277051..cc1488f9 100644
--- a/linux-core/drm_stub.c
+++ b/linux-core/drm_stub.c
@@ -47,7 +47,7 @@ MODULE_PARM_DESC(cards_limit, "Maximum number of graphics cards");
MODULE_PARM_DESC(drm_debug, "Enable debug output");
module_param(cards_limit, int, S_IRUGO);
-module_param(drm_debug, int, S_IRUGO|S_IWUGO);
+module_param_named(debug, drm_debug, int, S_IRUGO|S_IWUGO);
drm_head_t **drm_heads;
struct drm_sysfs_class *drm_class;
diff --git a/linux-core/radeon_i2c.c b/linux-core/radeon_i2c.c
index df369d6b..e19ea186 100644
--- a/linux-core/radeon_i2c.c
+++ b/linux-core/radeon_i2c.c
@@ -134,6 +134,8 @@ int radeon_create_i2c_busses(drm_device_t * dev)
dev_priv->i2c[3].ddc_reg = GPIO_CRT2_DDC;
setup_i2c_bus(dev, &dev_priv->i2c[3], "crt2");
+ request_module("eeprom");
+
return 0;
}