summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Delgass <ldelgass@users.sourceforge.net>2003-04-24 16:55:22 +0000
committerLeif Delgass <ldelgass@users.sourceforge.net>2003-04-24 16:55:22 +0000
commitd6a82ff9c160acbb7db5bee2cde45818d1e8548e (patch)
treecf97393d3dd3ef83ff8914d32dd79d7be7b8037a
parent2dc672a7908817f43391703a8341cb873fbb1543 (diff)
Remove unused dev->map_count. We always iterate the maplist with
list_for_each() and the count is not updated or used for stats.
-rw-r--r--linux-core/drmP.h1
-rw-r--r--linux-core/drm_drv.c1
-rw-r--r--linux-core/drm_ioctl.c2
-rw-r--r--linux/drmP.h1
-rw-r--r--linux/drm_drv.h1
-rw-r--r--linux/drm_ioctl.h2
6 files changed, 2 insertions, 6 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 08f4faa8..a4751f37 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -554,7 +554,6 @@ typedef struct drm_device {
/* Memory management */
drm_map_list_t *maplist; /* Linked list of regions */
- int map_count; /* Number of mappable regions */
drm_map_t **context_sareas;
int max_context;
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 88d27e15..4a15faec 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -316,7 +316,6 @@ static int DRM(setup)( drm_device_t *dev )
if(dev->maplist == NULL) return -ENOMEM;
memset(dev->maplist, 0, sizeof(*dev->maplist));
INIT_LIST_HEAD(&dev->maplist->head);
- dev->map_count = 0;
dev->vmalist = NULL;
dev->sigdata.lock = dev->lock.hw_lock = NULL;
diff --git a/linux-core/drm_ioctl.c b/linux-core/drm_ioctl.c
index 9b1069a1..62d5a6e4 100644
--- a/linux-core/drm_ioctl.c
+++ b/linux-core/drm_ioctl.c
@@ -197,7 +197,7 @@ int DRM(getmap)( struct inode *inode, struct file *filp,
idx = map.offset;
down(&dev->struct_sem);
- if (idx < 0 || idx >= dev->map_count) {
+ if (idx < 0) {
up(&dev->struct_sem);
return -EINVAL;
}
diff --git a/linux/drmP.h b/linux/drmP.h
index 08f4faa8..a4751f37 100644
--- a/linux/drmP.h
+++ b/linux/drmP.h
@@ -554,7 +554,6 @@ typedef struct drm_device {
/* Memory management */
drm_map_list_t *maplist; /* Linked list of regions */
- int map_count; /* Number of mappable regions */
drm_map_t **context_sareas;
int max_context;
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index 88d27e15..4a15faec 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -316,7 +316,6 @@ static int DRM(setup)( drm_device_t *dev )
if(dev->maplist == NULL) return -ENOMEM;
memset(dev->maplist, 0, sizeof(*dev->maplist));
INIT_LIST_HEAD(&dev->maplist->head);
- dev->map_count = 0;
dev->vmalist = NULL;
dev->sigdata.lock = dev->lock.hw_lock = NULL;
diff --git a/linux/drm_ioctl.h b/linux/drm_ioctl.h
index 9b1069a1..62d5a6e4 100644
--- a/linux/drm_ioctl.h
+++ b/linux/drm_ioctl.h
@@ -197,7 +197,7 @@ int DRM(getmap)( struct inode *inode, struct file *filp,
idx = map.offset;
down(&dev->struct_sem);
- if (idx < 0 || idx >= dev->map_count) {
+ if (idx < 0) {
up(&dev->struct_sem);
return -EINVAL;
}