diff options
author | 2009-01-29 11:38:44 +0000 | |
---|---|---|
committer | 2009-01-29 11:38:44 +0000 | |
commit | f0d0e8780d082a9233cb740d38be3069b2c6cff6 (patch) | |
tree | 8d9047dd3caad41d035ca75fe3dfad9e17ccab93 /sys | |
parent | No need to use RB_FIND here, RB_INSERT does that job for us. (diff) | |
download | wireguard-openbsd-f0d0e8780d082a9233cb740d38be3069b2c6cff6.tar.xz wireguard-openbsd-f0d0e8780d082a9233cb740d38be3069b2c6cff6.zip |
drm_getmap and interface can die too.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/drmP.h | 1 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_drv.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_ioctl.c | 36 |
3 files changed, 3 insertions, 40 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index 32453e3b258..9c5892be2d2 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -665,7 +665,6 @@ int drm_setversion(struct drm_device *, void *, struct drm_file *); /* Misc. IOCTL support (drm_ioctl.c) */ int drm_irq_by_busid(struct drm_device *, void *, struct drm_file *); int drm_getunique(struct drm_device *, void *, struct drm_file *); -int drm_getmap(struct drm_device *, void *, struct drm_file *); /* Context IOCTL support (drm_context.c) */ int drm_resctx(struct drm_device *, void *, struct drm_file *); diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index 713954edc9f..f85a91fce30 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -569,16 +569,16 @@ drmioctl(dev_t kdev, u_long cmd, caddr_t data, int flags, return (drm_getunique(dev, data, file_priv)); case DRM_IOCTL_GET_MAGIC: return (drm_getmagic(dev, data, file_priv)); - case DRM_IOCTL_GET_MAP: - return (drm_getmap(dev, data, file_priv)); case DRM_IOCTL_WAIT_VBLANK: return (drm_wait_vblank(dev, data, file_priv)); case DRM_IOCTL_MODESET_CTL: return (drm_modeset_ctl(dev, data, file_priv)); /* removed */ + case DRM_IOCTL_GET_MAP: + /* FALLTHROUGH */ case DRM_IOCTL_GET_CLIENT: - /*FALLTHROUGH*/ + /* FALLTHROUGH */ case DRM_IOCTL_GET_STATS: return (EINVAL); /* diff --git a/sys/dev/pci/drm/drm_ioctl.c b/sys/dev/pci/drm/drm_ioctl.c index fc3215d1710..9cdbb612c0f 100644 --- a/sys/dev/pci/drm/drm_ioctl.c +++ b/sys/dev/pci/drm/drm_ioctl.c @@ -55,42 +55,6 @@ drm_getunique(struct drm_device *dev, void *data, struct drm_file *file_priv) return 0; } -int -drm_getmap(struct drm_device *dev, void *data, struct drm_file *file_priv) -{ - struct drm_map *map = data; - drm_local_map_t *mapinlist; - int idx, i = 0; - - idx = map->offset; - - DRM_LOCK(); - if (idx < 0) { - DRM_UNLOCK(); - return EINVAL; - } - - TAILQ_FOREACH(mapinlist, &dev->maplist, link) { - if (i == idx) { - map->offset = mapinlist->offset; - map->size = mapinlist->size; - map->type = mapinlist->type; - map->flags = mapinlist->flags; - map->handle = mapinlist->handle; - map->mtrr = mapinlist->mtrr; - break; - } - i++; - } - - DRM_UNLOCK(); - - if (mapinlist == NULL) - return EINVAL; - - return 0; -} - #define DRM_IF_MAJOR 1 #define DRM_IF_MINOR 2 |