From bd1b331fae2813d9f03ceee649296f02edc0b893 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 26 May 2007 05:01:51 +1000 Subject: drm: cleanup use of Linux list handling macros This makes the drms use of the list handling macros a lot cleaner and more along the lines of how they should be used and uses them in some more places. Signed-off-by: Dave Airlie --- drivers/char/drm/drm_os_linux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/char/drm/drm_os_linux.h') diff --git a/drivers/char/drm/drm_os_linux.h b/drivers/char/drm/drm_os_linux.h index 0fe7b449792..e6e5ae89e10 100644 --- a/drivers/char/drm/drm_os_linux.h +++ b/drivers/char/drm/drm_os_linux.h @@ -104,7 +104,7 @@ static __inline__ int mtrr_del(int reg, unsigned long base, unsigned long size) #define DRM_GETSAREA() \ do { \ drm_map_list_t *entry; \ - list_for_each_entry( entry, &dev->maplist->head, head ) { \ + list_for_each_entry( entry, &dev->maplist, head ) { \ if ( entry->map && \ entry->map->type == _DRM_SHM && \ (entry->map->flags & _DRM_CONTAINS_LOCK) ) { \ -- cgit v1.2.3 From da509d7a02cb54938776439edc81f057e39f81e0 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 26 May 2007 05:04:51 +1000 Subject: drm: remove DRM_GETSAREA and replace with drm_getsarea function Signed-off-by: Dave Airlie --- drivers/char/drm/drm_os_linux.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'drivers/char/drm/drm_os_linux.h') diff --git a/drivers/char/drm/drm_os_linux.h b/drivers/char/drm/drm_os_linux.h index e6e5ae89e10..24767aaa8ea 100644 --- a/drivers/char/drm/drm_os_linux.h +++ b/drivers/char/drm/drm_os_linux.h @@ -96,24 +96,6 @@ static __inline__ int mtrr_del(int reg, unsigned long base, unsigned long size) #define DRM_GET_PRIV_WITH_RETURN(_priv, _filp) _priv = _filp->private_data -/** - * Get the pointer to the SAREA. - * - * Searches the SAREA on the mapping lists and points drm_device::sarea to it. - */ -#define DRM_GETSAREA() \ -do { \ - drm_map_list_t *entry; \ - list_for_each_entry( entry, &dev->maplist, head ) { \ - if ( entry->map && \ - entry->map->type == _DRM_SHM && \ - (entry->map->flags & _DRM_CONTAINS_LOCK) ) { \ - dev_priv->sarea = entry->map; \ - break; \ - } \ - } \ -} while (0) - #define DRM_HZ HZ #define DRM_WAIT_ON( ret, queue, timeout, condition ) \ -- cgit v1.2.3 From 84b1fd103dbbe01b5905db1444d3fc8afa9a7207 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 11 Jul 2007 15:53:27 +1000 Subject: drm: remove drm_file_t, drm_device_t and drm_head_t typedefs some drivers still todo. Signed-off-by: Dave Airlie --- drivers/char/drm/drm_os_linux.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/char/drm/drm_os_linux.h') diff --git a/drivers/char/drm/drm_os_linux.h b/drivers/char/drm/drm_os_linux.h index 24767aaa8ea..0b8d3433386 100644 --- a/drivers/char/drm/drm_os_linux.h +++ b/drivers/char/drm/drm_os_linux.h @@ -34,8 +34,8 @@ /** Read/write memory barrier */ #define DRM_MEMORYBARRIER() mb() /** DRM device local declaration */ -#define DRM_DEVICE drm_file_t *priv = filp->private_data; \ - drm_device_t *dev = priv->head->dev +#define DRM_DEVICE struct drm_file *priv = filp->private_data; \ + struct drm_device *dev = priv->head->dev /** IRQ handler arguments and return type and values */ #define DRM_IRQ_ARGS int irq, void *arg -- cgit v1.2.3