Prepare to eliminate inter_module_get("agp")
parent
ad87dd8427
commit
9ea6fe7aa6
|
@ -463,6 +463,8 @@ static struct file_operations drm_stub_fops = {
|
||||||
.open = drm_stub_open
|
.open = drm_stub_open
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int use_inter_module = 0;
|
||||||
|
|
||||||
static int __init drm_core_init(void)
|
static int __init drm_core_init(void)
|
||||||
{
|
{
|
||||||
int ret = -ENOMEM;
|
int ret = -ENOMEM;
|
||||||
|
@ -489,7 +491,12 @@ static int __init drm_core_init(void)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto err_p3;
|
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",
|
DRM_INFO("Initialized %s %d.%d.%d %s\n",
|
||||||
DRIVER_NAME,
|
DRIVER_NAME,
|
||||||
|
@ -506,9 +513,12 @@ err_p1:
|
||||||
|
|
||||||
static void __exit drm_core_exit(void)
|
static void __exit drm_core_exit(void)
|
||||||
{
|
{
|
||||||
if (drm_agp)
|
if (drm_agp) {
|
||||||
inter_module_put("drm_agp");
|
if (use_inter_module)
|
||||||
|
inter_module_put("agp");
|
||||||
|
else
|
||||||
|
symbol_put(drm_agp_entry);
|
||||||
|
}
|
||||||
remove_proc_entry("dri", NULL);
|
remove_proc_entry("dri", NULL);
|
||||||
drm_sysfs_destroy(drm_class);
|
drm_sysfs_destroy(drm_class);
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ MODULE_PARM_DESC(cards_limit, "Maximum number of graphics cards");
|
||||||
MODULE_PARM_DESC(drm_debug, "Enable debug output");
|
MODULE_PARM_DESC(drm_debug, "Enable debug output");
|
||||||
|
|
||||||
module_param(cards_limit, int, S_IRUGO);
|
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;
|
drm_head_t **drm_heads;
|
||||||
struct drm_sysfs_class *drm_class;
|
struct drm_sysfs_class *drm_class;
|
||||||
|
|
|
@ -134,6 +134,8 @@ int radeon_create_i2c_busses(drm_device_t * dev)
|
||||||
dev_priv->i2c[3].ddc_reg = GPIO_CRT2_DDC;
|
dev_priv->i2c[3].ddc_reg = GPIO_CRT2_DDC;
|
||||||
setup_i2c_bus(dev, &dev_priv->i2c[3], "crt2");
|
setup_i2c_bus(dev, &dev_priv->i2c[3], "crt2");
|
||||||
|
|
||||||
|
request_module("eeprom");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue