vserver 2.0 rc7
[linux-2.6.git] / drivers / char / drm / sis_mm.c
index 3038e05..6610c55 100644 (file)
 #include <video/sisfb.h>
 #endif
 
-drm_ioctl_desc_t sis_ioctls[] = {
-       [DRM_IOCTL_NR(DRM_SIS_FB_ALLOC)]  = { sis_fb_alloc,        1, 0 },
-       [DRM_IOCTL_NR(DRM_SIS_FB_FREE)]   = { sis_fb_free,         1, 0 },
-       [DRM_IOCTL_NR(DRM_SIS_AGP_INIT)]  = { sis_ioctl_agp_init,  1, 1 },
-       [DRM_IOCTL_NR(DRM_SIS_AGP_ALLOC)] = { sis_ioctl_agp_alloc, 1, 0 },
-       [DRM_IOCTL_NR(DRM_SIS_AGP_FREE)]  = { sis_ioctl_agp_free,  1, 0 },
-       [DRM_IOCTL_NR(DRM_SIS_FB_INIT)]   = { sis_fb_init,         1, 1 }
-};
-
-int sis_max_ioctl = DRM_ARRAY_SIZE(sis_ioctls);
-
 #define MAX_CONTEXT 100
 #define VIDEO_TYPE 0 
 #define AGP_TYPE 1
@@ -91,12 +80,12 @@ static int del_alloc_set(int context, int type, unsigned int val)
 /* fb management via fb device */ 
 #if defined(__linux__) && defined(CONFIG_FB_SIS)
 
-int sis_fb_init( DRM_IOCTL_ARGS )
+static int sis_fb_init( DRM_IOCTL_ARGS )
 {
        return 0;
 }
 
-int sis_fb_alloc( DRM_IOCTL_ARGS )
+static int sis_fb_alloc( DRM_IOCTL_ARGS )
 {
        drm_sis_mem_t fb;
        struct sis_memreq req;
@@ -129,7 +118,7 @@ int sis_fb_alloc( DRM_IOCTL_ARGS )
        return retval;
 }
 
-int sis_fb_free( DRM_IOCTL_ARGS )
+static int sis_fb_free( DRM_IOCTL_ARGS )
 {
        drm_sis_mem_t fb;
        int retval = 0;
@@ -160,7 +149,7 @@ int sis_fb_free( DRM_IOCTL_ARGS )
  *    X driver/sisfb                                  HW-   Command-
  *  framebuffer memory           DRI heap           Cursor   queue
  */
-int sis_fb_init( DRM_IOCTL_ARGS )
+static int sis_fb_init( DRM_IOCTL_ARGS )
 {
        DRM_DEVICE;
        drm_sis_private_t *dev_priv = dev->dev_private;
@@ -186,7 +175,7 @@ int sis_fb_init( DRM_IOCTL_ARGS )
        return 0;
 }
 
-int sis_fb_alloc( DRM_IOCTL_ARGS )
+static int sis_fb_alloc( DRM_IOCTL_ARGS )
 {
        DRM_DEVICE;
        drm_sis_private_t *dev_priv = dev->dev_private;
@@ -223,7 +212,7 @@ int sis_fb_alloc( DRM_IOCTL_ARGS )
        return retval;
 }
 
-int sis_fb_free( DRM_IOCTL_ARGS )
+static int sis_fb_free( DRM_IOCTL_ARGS )
 {
        DRM_DEVICE;
        drm_sis_private_t *dev_priv = dev->dev_private;
@@ -250,7 +239,7 @@ int sis_fb_free( DRM_IOCTL_ARGS )
 
 /* agp memory management */ 
 
-int sis_ioctl_agp_init( DRM_IOCTL_ARGS )
+static int sis_ioctl_agp_init( DRM_IOCTL_ARGS )
 {
        DRM_DEVICE;
        drm_sis_private_t *dev_priv = dev->dev_private;
@@ -276,7 +265,7 @@ int sis_ioctl_agp_init( DRM_IOCTL_ARGS )
        return 0;
 }
 
-int sis_ioctl_agp_alloc( DRM_IOCTL_ARGS )
+static int sis_ioctl_agp_alloc( DRM_IOCTL_ARGS )
 {
        DRM_DEVICE;
        drm_sis_private_t *dev_priv = dev->dev_private;
@@ -313,7 +302,7 @@ int sis_ioctl_agp_alloc( DRM_IOCTL_ARGS )
        return retval;
 }
 
-int sis_ioctl_agp_free( DRM_IOCTL_ARGS )
+static int sis_ioctl_agp_free( DRM_IOCTL_ARGS )
 {
        DRM_DEVICE;
        drm_sis_private_t *dev_priv = dev->dev_private;
@@ -414,3 +403,15 @@ int sis_final_context(struct drm_device *dev, int context)
        
        return 1;
 }
+
+drm_ioctl_desc_t sis_ioctls[] = {
+       [DRM_IOCTL_NR(DRM_SIS_FB_ALLOC)]  = { sis_fb_alloc,        1, 0 },
+       [DRM_IOCTL_NR(DRM_SIS_FB_FREE)]   = { sis_fb_free,         1, 0 },
+       [DRM_IOCTL_NR(DRM_SIS_AGP_INIT)]  = { sis_ioctl_agp_init,  1, 1 },
+       [DRM_IOCTL_NR(DRM_SIS_AGP_ALLOC)] = { sis_ioctl_agp_alloc, 1, 0 },
+       [DRM_IOCTL_NR(DRM_SIS_AGP_FREE)]  = { sis_ioctl_agp_free,  1, 0 },
+       [DRM_IOCTL_NR(DRM_SIS_FB_INIT)]   = { sis_fb_init,         1, 1 }
+};
+
+int sis_max_ioctl = DRM_ARRAY_SIZE(sis_ioctls);
+