diff options
author | Dave Airlie <airlied@linux.ie> | 2005-08-07 05:37:25 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-08-07 05:37:25 +0000 |
commit | 3a61e9f96ce50101f05a5ca2cb0e34b2aa001b55 (patch) | |
tree | 4cb3c3242b3a5189fcf013bd2db739ebc5d47d7a | |
parent | 1cbe97eea1a7ffcbf19767e83dce09da56c454f6 (diff) |
make some functions static in the savage drm driver
-rw-r--r-- | linux-core/savage_drv.c | 12 | ||||
-rw-r--r-- | shared-core/savage_bci.c | 16 | ||||
-rw-r--r-- | shared-core/savage_drv.h | 3 |
3 files changed, 17 insertions, 14 deletions
diff --git a/linux-core/savage_drv.c b/linux-core/savage_drv.c index be54bd47..5c7cdd32 100644 --- a/linux-core/savage_drv.c +++ b/linux-core/savage_drv.c @@ -34,12 +34,8 @@ static struct pci_device_id pciidlist[] = { savage_PCI_IDS }; -static drm_ioctl_desc_t ioctls[] = { - [DRM_IOCTL_NR(DRM_SAVAGE_BCI_INIT)] = {savage_bci_init, 1, 1, 1}, - [DRM_IOCTL_NR(DRM_SAVAGE_BCI_CMDBUF)] = {savage_bci_cmdbuf, 1, 0, 0}, - [DRM_IOCTL_NR(DRM_SAVAGE_BCI_EVENT_EMIT)] = {savage_bci_event_emit, 1, 0, 0}, - [DRM_IOCTL_NR(DRM_SAVAGE_BCI_EVENT_WAIT)] = {savage_bci_event_wait, 1, 0, 0}, -}; +extern drm_ioctl_desc_t savage_ioctls[]; +extern int savage_max_ioctl; static int probe(struct pci_dev *pdev, const struct pci_device_id *ent); static struct drm_driver driver = { @@ -54,8 +50,7 @@ static struct drm_driver driver = { .reclaim_buffers = savage_reclaim_buffers, .get_map_ofs = drm_core_get_map_ofs, .get_reg_ofs = drm_core_get_reg_ofs, - .ioctls = ioctls, - .num_ioctls = DRM_ARRAY_SIZE(ioctls), + .ioctls = savage_ioctls, .dma_ioctl = savage_bci_buffers, .fops = { .owner = THIS_MODULE, @@ -88,6 +83,7 @@ static int probe(struct pci_dev *pdev, const struct pci_device_id *ent) static int __init savage_init(void) { + driver.num_ioctls = savage_max_ioctl; return drm_init(&driver, pciidlist); } diff --git a/shared-core/savage_bci.c b/shared-core/savage_bci.c index 9a604b6e..22e92b54 100644 --- a/shared-core/savage_bci.c +++ b/shared-core/savage_bci.c @@ -926,7 +926,7 @@ int savage_do_cleanup_bci(drm_device_t *dev) return 0; } -int savage_bci_init(DRM_IOCTL_ARGS) +static int savage_bci_init(DRM_IOCTL_ARGS) { DRM_DEVICE; drm_savage_init_t init; @@ -946,7 +946,7 @@ int savage_bci_init(DRM_IOCTL_ARGS) return DRM_ERR(EINVAL); } -int savage_bci_event_emit(DRM_IOCTL_ARGS) +static int savage_bci_event_emit(DRM_IOCTL_ARGS) { DRM_DEVICE; drm_savage_private_t *dev_priv = dev->dev_private; @@ -966,7 +966,7 @@ int savage_bci_event_emit(DRM_IOCTL_ARGS) return 0; } -int savage_bci_event_wait(DRM_IOCTL_ARGS) +static int savage_bci_event_wait(DRM_IOCTL_ARGS) { DRM_DEVICE; drm_savage_private_t *dev_priv = dev->dev_private; @@ -1097,3 +1097,13 @@ void savage_reclaim_buffers(drm_device_t *dev, DRMFILE filp) { drm_core_reclaim_buffers(dev, filp); } + +drm_ioctl_desc_t savage_ioctls[] = { + [DRM_IOCTL_NR(DRM_SAVAGE_BCI_INIT)] = {savage_bci_init, 1, 1}, + [DRM_IOCTL_NR(DRM_SAVAGE_BCI_CMDBUF)] = {savage_bci_cmdbuf, 1, 0}, + [DRM_IOCTL_NR(DRM_SAVAGE_BCI_EVENT_EMIT)] = {savage_bci_event_emit, 1, 0}, + [DRM_IOCTL_NR(DRM_SAVAGE_BCI_EVENT_WAIT)] = {savage_bci_event_wait, 1, 0}, +}; + +int savage_max_ioctl = DRM_ARRAY_SIZE(savage_ioctls); + diff --git a/shared-core/savage_drv.h b/shared-core/savage_drv.h index 51266adb..3b64ad2a 100644 --- a/shared-core/savage_drv.h +++ b/shared-core/savage_drv.h @@ -194,10 +194,7 @@ typedef struct drm_savage_private { } drm_savage_private_t; /* ioctls */ -extern int savage_bci_init(DRM_IOCTL_ARGS); extern int savage_bci_cmdbuf(DRM_IOCTL_ARGS); -extern int savage_bci_event_emit(DRM_IOCTL_ARGS); -extern int savage_bci_event_wait(DRM_IOCTL_ARGS); extern int savage_bci_buffers(DRM_IOCTL_ARGS); /* BCI functions */ |