.open = drm_stub_open
};
+static int use_inter_module = 0;
+
static int __init drm_core_init(void)
{
int ret = -ENOMEM;
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,
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);
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;
dev_priv->i2c[3].ddc_reg = GPIO_CRT2_DDC;
setup_i2c_bus(dev, &dev_priv->i2c[3], "crt2");
+ request_module("eeprom");
+
return 0;
}