summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-01-02 05:54:10 +0000
committerDave Airlie <airlied@linux.ie>2006-01-02 05:54:10 +0000
commit92150972e5472cdf039c875dae4afee6613ee915 (patch)
tree4b86163a41463823bff36e4d07b687391b9abf39 /linux-core
parent781d96c61fdcc5bafe65053878d351100bf130e1 (diff)
use drm_cards_limit instead of cards_limit
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drmP.h2
-rw-r--r--linux-core/drm_drv.c12
-rw-r--r--linux-core/drm_fops.c4
-rw-r--r--linux-core/drm_stub.c6
4 files changed, 12 insertions, 12 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 8044780b..54091a86 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -981,7 +981,7 @@ extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
extern int drm_put_dev(drm_device_t * dev);
extern int drm_put_head(drm_head_t * head);
extern unsigned int drm_debug; /* 1 to enable debug output */
-extern unsigned int cards_limit;
+extern unsigned int drm_cards_limit;
extern drm_head_t **drm_heads;
extern struct drm_sysfs_class *drm_class;
extern struct proc_dir_entry *drm_proc_root;
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index b274da2c..5c25fe7c 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -385,7 +385,7 @@ void __exit drm_exit(struct drm_driver *driver)
DRM_DEBUG("\n");
if (drm_fb_loaded) {
- for (i = 0; i < cards_limit; i++) {
+ for (i = 0; i < drm_cards_limit; i++) {
head = drm_heads[i];
if (!head)
continue;
@@ -417,9 +417,9 @@ static int __init drm_core_init(void)
{
int ret = -ENOMEM;
- cards_limit =
- (cards_limit < DRM_MAX_MINOR + 1 ? cards_limit : DRM_MAX_MINOR + 1);
- drm_heads = drm_calloc(cards_limit, sizeof(*drm_heads), DRM_MEM_STUB);
+ drm_cards_limit =
+ (drm_cards_limit < DRM_MAX_MINOR + 1 ? drm_cards_limit : DRM_MAX_MINOR + 1);
+ drm_heads = drm_calloc(drm_cards_limit, sizeof(*drm_heads), DRM_MEM_STUB);
if (!drm_heads)
goto err_p1;
@@ -450,7 +450,7 @@ err_p3:
drm_sysfs_destroy(drm_class);
err_p2:
unregister_chrdev(DRM_MAJOR, "drm");
- drm_free(drm_heads, sizeof(*drm_heads) * cards_limit, DRM_MEM_STUB);
+ drm_free(drm_heads, sizeof(*drm_heads) * drm_cards_limit, DRM_MEM_STUB);
err_p1:
return ret;
}
@@ -462,7 +462,7 @@ static void __exit drm_core_exit(void)
unregister_chrdev(DRM_MAJOR, "drm");
- drm_free(drm_heads, sizeof(*drm_heads) * cards_limit, DRM_MEM_STUB);
+ drm_free(drm_heads, sizeof(*drm_heads) * drm_cards_limit, DRM_MEM_STUB);
}
module_init(drm_core_init);
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c
index 410f5c81..f2de90ae 100644
--- a/linux-core/drm_fops.c
+++ b/linux-core/drm_fops.c
@@ -133,7 +133,7 @@ int drm_open(struct inode *inode, struct file *filp)
int minor = iminor(inode);
int retcode = 0;
- if (!((minor >= 0) && (minor < cards_limit)))
+ if (!((minor >= 0) && (minor < drm_cards_limit)))
return -ENODEV;
if (!drm_heads[minor])
@@ -175,7 +175,7 @@ int drm_stub_open(struct inode *inode, struct file *filp)
DRM_DEBUG("\n");
- if (!((minor >= 0) && (minor < cards_limit)))
+ if (!((minor >= 0) && (minor < drm_cards_limit)))
return -ENODEV;
if (!drm_heads[minor])
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c
index 52b5e9c6..eb64798e 100644
--- a/linux-core/drm_stub.c
+++ b/linux-core/drm_stub.c
@@ -37,7 +37,7 @@
#include "drmP.h"
#include "drm_core.h"
-unsigned int cards_limit = 16; /* Enough for one machine */
+unsigned int drm_cards_limit = 16; /* Enough for one machine */
unsigned int drm_debug = 0; /* 1 to enable debug output */
EXPORT_SYMBOL(drm_debug);
@@ -47,7 +47,7 @@ MODULE_LICENSE("GPL and additional rights");
MODULE_PARM_DESC(cards_limit, "Maximum number of graphics cards");
MODULE_PARM_DESC(debug, "Enable debug output");
-module_param(cards_limit, int, S_IRUGO);
+module_param_named(cards_limit, drm_cards_limit, int, S_IRUGO);
module_param_named(debug, drm_debug, int, S_IRUGO|S_IWUGO);
drm_head_t **drm_heads;
@@ -149,7 +149,7 @@ static int drm_get_head(drm_device_t * dev, drm_head_t * head)
DRM_DEBUG("\n");
- for (minor = 0; minor < cards_limit; minor++, heads++) {
+ for (minor = 0; minor < drm_cards_limit; minor++, heads++) {
if (!*heads) {
*head = (drm_head_t) {