]> err.no Git - linux-2.6/commitdiff
drm: cleanups
authorAdrian Bunk <bunk@stusta.de>
Wed, 16 Aug 2006 01:55:18 +0000 (11:55 +1000)
committerDave Airlie <airlied@linux.ie>
Thu, 21 Sep 2006 19:32:33 +0000 (05:32 +1000)
This patch contains the following cleanups:
- make 3 needlessly global functions static
- sis_mm.c: fix compile warnings with CONFIG_FB_SIS=y

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/char/drm/drm_bufs.c
drivers/char/drm/drm_sman.c
drivers/char/drm/sis_mm.c

index 71d2e09176361144e693190db4c8bc6372d1716b..03c6db9029cf4fc5497c54ad1c0aacb3b114bc27 100644 (file)
@@ -65,8 +65,8 @@ static drm_map_list_t *drm_find_matching_map(drm_device_t *dev,
        return NULL;
 }
 
-int drm_map_handle(drm_device_t *dev, drm_hash_item_t *hash,
-                  unsigned long user_token, int hashed_handle)
+static int drm_map_handle(drm_device_t *dev, drm_hash_item_t *hash,
+                         unsigned long user_token, int hashed_handle)
 {
        int use_hashed_handle;
 #if (BITS_PER_LONG == 64)
index b92f0ee74b39c198b8373f0ee73adb4b3598f5c3..425c82336ee0310149a7c6461eeed7c5327d8d6a 100644 (file)
@@ -114,7 +114,7 @@ static void drm_sman_mm_destroy(void *private)
        drm_free(mm, sizeof(*mm), DRM_MEM_MM);
 }
 
-unsigned long drm_sman_mm_offset(void *private, void *ref)
+static unsigned long drm_sman_mm_offset(void *private, void *ref)
 {
        drm_mm_node_t *node = (drm_mm_node_t *) ref;
        return node->start;
index 1b21e324d04e4d67cef9f550d458aec30a79b7ce..d26f5dbb78538ea4532c7f79965fdd91aefd3fd1 100644 (file)
@@ -40,8 +40,6 @@
 #define VIDEO_TYPE 0
 #define AGP_TYPE 1
 
-#define SIS_MM_ALIGN_SHIFT 4
-#define SIS_MM_ALIGN_MASK ( (1 << SIS_MM_ALIGN_SHIFT) - 1)
 
 #if defined(CONFIG_FB_SIS)
 /* fb management via fb device */
@@ -72,12 +70,17 @@ static void sis_sman_mm_destroy(void *private)
        ;
 }
 
-unsigned long sis_sman_mm_offset(void *private, void *ref)
+static unsigned long sis_sman_mm_offset(void *private, void *ref)
 {
        return ~((unsigned long)ref);
 }
 
-#endif
+#else /* CONFIG_FB_SIS */
+
+#define SIS_MM_ALIGN_SHIFT 4
+#define SIS_MM_ALIGN_MASK ( (1 << SIS_MM_ALIGN_SHIFT) - 1)
+
+#endif /* CONFIG_FB_SIS */
 
 static int sis_fb_init(DRM_IOCTL_ARGS)
 {