diff options
author | Dave Airlie <airlied@linux.ie> | 2004-10-09 12:42:52 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2004-10-09 12:42:52 +0000 |
commit | 8727326371621c8c2b9f794532ca543a708ed71f (patch) | |
tree | ab85363988151c24b21483307312e543418a2ba6 /shared | |
parent | efcb9fb7ae3caad341bd8c82febf9d65b2a73933 (diff) |
cleanup VIA driver to look a bit like others before kernel merge
Diffstat (limited to 'shared')
-rw-r--r-- | shared/via.h | 24 | ||||
-rw-r--r-- | shared/via_drv.c | 22 | ||||
-rw-r--r-- | shared/via_map.c | 1 | ||||
-rw-r--r-- | shared/via_mm.c | 4 |
4 files changed, 24 insertions, 27 deletions
diff --git a/shared/via.h b/shared/via.h index e14215a3..e87b617f 100644 --- a/shared/via.h +++ b/shared/via.h @@ -26,8 +26,26 @@ #define DRM(x) viadrv_##x -/* BEAM: Have enabled DMA,DMA_IRQ and VBL_IRQ needed to do this to get standard - * support for VBL_IRQ. - */ +#define DRIVER_AUTHOR "VIA" + +#define DRIVER_NAME "via" +#define DRIVER_DESC "VIA Unichrome" +#define DRIVER_DATE "20041010" + +#define DRIVER_MAJOR 2 +#define DRIVER_MINOR 0 +#define DRIVER_PATCHLEVEL 0 + +#define DRIVER_IOCTLS \ + [DRM_IOCTL_NR(DRM_IOCTL_VIA_ALLOCMEM)] = { via_mem_alloc, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_VIA_FREEMEM)] = { via_mem_free, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_VIA_AGP_INIT)] = { via_agp_init, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_VIA_FB_INIT)] = { via_fb_init, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_VIA_MAP_INIT)] = { via_map_init, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_VIA_DEC_FUTEX)] = { via_decoder_futex, 1, 0}, \ + [DRM_IOCTL_NR(DRM_IOCTL_VIA_DMA_INIT)] = { via_dma_init, 1, 0}, \ + [DRM_IOCTL_NR(DRM_IOCTL_VIA_CMDBUFFER)] = { via_cmdbuffer, 1, 0}, \ + [DRM_IOCTL_NR(DRM_IOCTL_VIA_FLUSH)] = { via_flush_ioctl, 1, 0}, \ + [DRM_IOCTL_NR(DRM_IOCTL_VIA_PCICMD)] = { via_pci_cmdbuffer, 1, 0} #endif diff --git a/shared/via_drv.c b/shared/via_drv.c index 7e69781a..5a385c11 100644 --- a/shared/via_drv.c +++ b/shared/via_drv.c @@ -28,26 +28,4 @@ #include "via_drm.h" #include "via_drv.h" -#define DRIVER_AUTHOR "VIA" - -#define DRIVER_NAME "via" -#define DRIVER_DESC "VIA Unichrome" -#define DRIVER_DATE "20041010" - -#define DRIVER_MAJOR 2 -#define DRIVER_MINOR 0 -#define DRIVER_PATCHLEVEL 0 - -#define DRIVER_IOCTLS \ - [DRM_IOCTL_NR(DRM_IOCTL_VIA_ALLOCMEM)] = { via_mem_alloc, 1, 0 }, \ - [DRM_IOCTL_NR(DRM_IOCTL_VIA_FREEMEM)] = { via_mem_free, 1, 0 }, \ - [DRM_IOCTL_NR(DRM_IOCTL_VIA_AGP_INIT)] = { via_agp_init, 1, 0 }, \ - [DRM_IOCTL_NR(DRM_IOCTL_VIA_FB_INIT)] = { via_fb_init, 1, 0 }, \ - [DRM_IOCTL_NR(DRM_IOCTL_VIA_MAP_INIT)] = { via_map_init, 1, 0 }, \ - [DRM_IOCTL_NR(DRM_IOCTL_VIA_DEC_FUTEX)] = { via_decoder_futex, 1, 0}, \ - [DRM_IOCTL_NR(DRM_IOCTL_VIA_DMA_INIT)] = { via_dma_init, 1, 0}, \ - [DRM_IOCTL_NR(DRM_IOCTL_VIA_CMDBUFFER)] = { via_cmdbuffer, 1, 0}, \ - [DRM_IOCTL_NR(DRM_IOCTL_VIA_FLUSH)] = { via_flush_ioctl, 1, 0}, \ - [DRM_IOCTL_NR(DRM_IOCTL_VIA_PCICMD)] = { via_pci_cmdbuffer, 1, 0} - #include "drm_core.h" diff --git a/shared/via_map.c b/shared/via_map.c index 58954401..3aa66a17 100644 --- a/shared/via_map.c +++ b/shared/via_map.c @@ -23,6 +23,7 @@ */ #include "via.h" #include "drmP.h" +#include "via_drm.h" #include "via_drv.h" int via_do_init_map(drm_device_t * dev, drm_via_init_t * init) diff --git a/shared/via_mm.c b/shared/via_mm.c index 37a2eab0..79761caf 100644 --- a/shared/via_mm.c +++ b/shared/via_mm.c @@ -78,7 +78,7 @@ int via_agp_init(DRM_IOCTL_ARGS) AgpHeap = via_mmInit(agp.offset, agp.size); - DRM_DEBUG("offset = %lu, size = %lu", agp.offset, agp.size); + DRM_DEBUG("offset = %lu, size = %lu", (unsigned long)agp.offset, (unsigned long)agp.size); return 0; } @@ -94,7 +94,7 @@ int via_fb_init(DRM_IOCTL_ARGS) FBHeap = via_mmInit(fb.offset, fb.size); - DRM_DEBUG("offset = %lu, size = %lu", fb.offset, fb.size); + DRM_DEBUG("offset = %lu, size = %lu", (unsigned long)fb.offset, (unsigned long)fb.size); return 0; } |