diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2022-07-02 08:50:43 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2022-07-02 08:50:43 +0000 |
commit | ba9e2da185db87b907ce5e5ab973261b6b71b8d3 (patch) | |
tree | c794dbe2375ac56389d511a6ec35c4e9f244ac82 /sys/dev/pci | |
parent | f487f43fd3d05d932c6483c4cbeed9667ffcfdf2 (diff) |
Remove unused device poll functions.
Also remove unneeded includes of <sys/poll.h> and <sys/select.h>.
Some addenda from jsg@.
OK miod@ mpi@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/bktr/bktr_os.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_drv.c | 29 |
2 files changed, 1 insertions, 32 deletions
diff --git a/sys/dev/pci/bktr/bktr_os.c b/sys/dev/pci/bktr/bktr_os.c index 8b463c49160..c6018b9b4b2 100644 --- a/sys/dev/pci/bktr/bktr_os.c +++ b/sys/dev/pci/bktr/bktr_os.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bktr_os.c,v 1.36 2022/03/21 19:22:41 miod Exp $ */ +/* $OpenBSD: bktr_os.c,v 1.37 2022/07/02 08:50:42 visa Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp $ */ /* @@ -60,8 +60,6 @@ #include <sys/kernel.h> #include <sys/signalvar.h> #include <sys/mman.h> -#include <sys/poll.h> -#include <sys/selinfo.h> #include <sys/vnode.h> #if NRADIO > 0 #include <sys/radioio.h> diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index a0a1deaabb1..ec6681cbd38 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -28,7 +28,6 @@ #include <sys/param.h> #include <sys/fcntl.h> -#include <sys/poll.h> #include <sys/specdev.h> #include <sys/vnode.h> @@ -1864,34 +1863,6 @@ out: return (gotone); } -int -drmpoll(dev_t kdev, int events, struct proc *p) -{ - struct drm_device *dev = drm_get_device_from_kdev(kdev); - struct drm_file *file_priv; - int revents = 0; - - if (dev == NULL) - return (POLLERR); - - mutex_lock(&dev->filelist_mutex); - file_priv = drm_find_file_by_minor(dev, minor(kdev)); - mutex_unlock(&dev->filelist_mutex); - if (file_priv == NULL) - return (POLLERR); - - mtx_enter(&dev->event_lock); - if (events & (POLLIN | POLLRDNORM)) { - if (!list_empty(&file_priv->event_list)) - revents |= events & (POLLIN | POLLRDNORM); - else - selrecord(p, &file_priv->rsel); - } - mtx_leave(&dev->event_lock); - - return (revents); -} - paddr_t drmmmap(dev_t kdev, off_t offset, int prot) { |