diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-04-11 02:18:27 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-04-18 07:03:51 -0400 |
commit | 031de96af0e7ed6ad4a7ec2b74a77bf9782f966e (patch) | |
tree | c59cd37933c250b405ffe01b8decb274bc50d25a /drivers/char/drm/drm_memory.c | |
parent | 31f64bd101ea256f9fc4a7f1f1706d6417d5550a (diff) |
drivers/char/drm/drm_memory.c: possible cleanups
- #if 0 the following unused global function:
- drm_ioremap_nocache()
- make the following needlessly global functions static:
- agp_remap()
- drm_lookup_map()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'drivers/char/drm/drm_memory.c')
-rw-r--r-- | drivers/char/drm/drm_memory.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/drivers/char/drm/drm_memory.c b/drivers/char/drm/drm_memory.c index 7ea00e3372fd..7e3318e1d1c6 100644 --- a/drivers/char/drm/drm_memory.c +++ b/drivers/char/drm/drm_memory.c | |||
@@ -83,8 +83,8 @@ void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area) | |||
83 | /* | 83 | /* |
84 | * Find the drm_map that covers the range [offset, offset+size). | 84 | * Find the drm_map that covers the range [offset, offset+size). |
85 | */ | 85 | */ |
86 | drm_map_t *drm_lookup_map(unsigned long offset, | 86 | static drm_map_t *drm_lookup_map(unsigned long offset, |
87 | unsigned long size, drm_device_t * dev) | 87 | unsigned long size, drm_device_t * dev) |
88 | { | 88 | { |
89 | struct list_head *list; | 89 | struct list_head *list; |
90 | drm_map_list_t *r_list; | 90 | drm_map_list_t *r_list; |
@@ -102,8 +102,8 @@ drm_map_t *drm_lookup_map(unsigned long offset, | |||
102 | return NULL; | 102 | return NULL; |
103 | } | 103 | } |
104 | 104 | ||
105 | void *agp_remap(unsigned long offset, unsigned long size, | 105 | static void *agp_remap(unsigned long offset, unsigned long size, |
106 | drm_device_t * dev) | 106 | drm_device_t * dev) |
107 | { | 107 | { |
108 | unsigned long *phys_addr_map, i, num_pages = | 108 | unsigned long *phys_addr_map, i, num_pages = |
109 | PAGE_ALIGN(size) / PAGE_SIZE; | 109 | PAGE_ALIGN(size) / PAGE_SIZE; |
@@ -168,6 +168,21 @@ int drm_unbind_agp(DRM_AGP_MEM * handle) | |||
168 | { | 168 | { |
169 | return drm_agp_unbind_memory(handle); | 169 | return drm_agp_unbind_memory(handle); |
170 | } | 170 | } |
171 | |||
172 | #else /* __OS_HAS_AGP */ | ||
173 | |||
174 | static inline drm_map_t *drm_lookup_map(unsigned long offset, | ||
175 | unsigned long size, drm_device_t * dev) | ||
176 | { | ||
177 | return NULL; | ||
178 | } | ||
179 | |||
180 | static inline void *agp_remap(unsigned long offset, unsigned long size, | ||
181 | drm_device_t * dev) | ||
182 | { | ||
183 | return NULL; | ||
184 | } | ||
185 | |||
171 | #endif /* agp */ | 186 | #endif /* agp */ |
172 | 187 | ||
173 | void *drm_ioremap(unsigned long offset, unsigned long size, | 188 | void *drm_ioremap(unsigned long offset, unsigned long size, |
@@ -183,6 +198,7 @@ void *drm_ioremap(unsigned long offset, unsigned long size, | |||
183 | } | 198 | } |
184 | EXPORT_SYMBOL(drm_ioremap); | 199 | EXPORT_SYMBOL(drm_ioremap); |
185 | 200 | ||
201 | #if 0 | ||
186 | void *drm_ioremap_nocache(unsigned long offset, | 202 | void *drm_ioremap_nocache(unsigned long offset, |
187 | unsigned long size, drm_device_t * dev) | 203 | unsigned long size, drm_device_t * dev) |
188 | { | 204 | { |
@@ -194,6 +210,7 @@ void *drm_ioremap_nocache(unsigned long offset, | |||
194 | } | 210 | } |
195 | return ioremap_nocache(offset, size); | 211 | return ioremap_nocache(offset, size); |
196 | } | 212 | } |
213 | #endif /* 0 */ | ||
197 | 214 | ||
198 | void drm_ioremapfree(void *pt, unsigned long size, | 215 | void drm_ioremapfree(void *pt, unsigned long size, |
199 | drm_device_t * dev) | 216 | drm_device_t * dev) |