From cb5aaa89871c051098ae8067d0e386840b7bdc59 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 6 Nov 2004 23:02:07 +0000 Subject: Convert more drivers for bsd-core, moving the ioctl definitions to shared code. Remove the "drv" from sisdrv, as it's unnecessary. Use the drm_pci functions in i915 instead of per-os implementations of the same. Avoid whitespace within fields in drm_pciids.txt (one of the r300 definitions), since it breaks the bsd pciids script. Tested on sis, mga, r128. i915 needs more work. --- linux-core/sis_drv.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'linux-core/sis_drv.c') diff --git a/linux-core/sis_drv.c b/linux-core/sis_drv.c index a6300509..70dd10e7 100644 --- a/linux-core/sis_drv.c +++ b/linux-core/sis_drv.c @@ -58,17 +58,11 @@ static int version(drm_version_t * version) } static struct pci_device_id pciidlist[] = { - sisdrv_PCI_IDS + sis_PCI_IDS }; -static drm_ioctl_desc_t 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} -}; +extern drm_ioctl_desc_t sis_ioctls[]; +extern int sis_max_ioctl; static int probe(struct pci_dev *pdev, const struct pci_device_id *ent); static struct drm_driver driver = { @@ -80,8 +74,8 @@ static struct drm_driver driver = { .get_reg_ofs = drm_core_get_reg_ofs, .postinit = postinit, .version = version, - .ioctls = ioctls, - .num_ioctls = DRM_ARRAY_SIZE(ioctls), + .ioctls = sis_ioctls, + .num_ioctls = sis_max_ioctl, .fops = { .owner = THIS_MODULE, .open = drm_open, -- cgit v1.2.3