diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2011-09-17 08:36:07 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2011-09-17 08:36:07 +0000 |
commit | 2af93ac69f23f2cd6b4733d5610b1b15986bb12d (patch) | |
tree | 92c7dc8ca9c73508651fb793e4f7b68cd215c4fe | |
parent | c2710989f484669321b4a97d521c7d1e2c083468 (diff) |
Don't bother keeping a {u,}lptioctl function which is a duplicate of
enodev().
ok jsing@ krw@ deraadt@
-rw-r--r-- | sys/dev/ic/lpt.c | 21 | ||||
-rw-r--r-- | sys/dev/usb/ulpt.c | 16 | ||||
-rw-r--r-- | sys/sys/conf.h | 14 |
3 files changed, 9 insertions, 42 deletions
diff --git a/sys/dev/ic/lpt.c b/sys/dev/ic/lpt.c index 4d2b1b50eb2..046dc87611b 100644 --- a/sys/dev/ic/lpt.c +++ b/sys/dev/ic/lpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lpt.c,v 1.7 2010/08/06 00:00:41 miod Exp $ */ +/* $OpenBSD: lpt.c,v 1.8 2011/09/17 08:36:06 miod Exp $ */ /* $NetBSD: lpt.c,v 1.42 1996/10/21 22:41:14 thorpej Exp $ */ /* @@ -59,7 +59,6 @@ #include <sys/proc.h> #include <sys/buf.h> #include <sys/kernel.h> -#include <sys/ioctl.h> #include <sys/uio.h> #include <sys/device.h> #include <sys/conf.h> @@ -430,21 +429,3 @@ lptintr(arg) return 1; } - -int -lptioctl(dev, cmd, data, flag, p) - dev_t dev; - u_long cmd; - caddr_t data; - int flag; - struct proc *p; -{ - int error = 0; - - switch (cmd) { - default: - error = ENODEV; - } - - return error; -} diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 1dfa1951e85..727e5a87bae 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ulpt.c,v 1.39 2011/07/03 15:47:17 matthew Exp $ */ +/* $OpenBSD: ulpt.c,v 1.40 2011/09/17 08:36:06 miod Exp $ */ /* $NetBSD: ulpt.c,v 1.57 2003/01/05 10:19:42 scw Exp $ */ /* $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.24 1999/11/17 22:33:44 n_hibma Exp $ */ @@ -42,7 +42,6 @@ #include <sys/proc.h> #include <sys/kernel.h> #include <sys/device.h> -#include <sys/ioctl.h> #include <sys/uio.h> #include <sys/conf.h> #include <sys/vnode.h> @@ -609,19 +608,6 @@ ulptwrite(dev_t dev, struct uio *uio, int flags) return (error); } -int -ulptioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) -{ - int error = 0; - - switch (cmd) { - default: - error = ENODEV; - } - - return (error); -} - #if 0 /* XXX This does not belong here. */ /* diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 388215ddc89..a6b5cc2f258 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.115 2011/07/06 14:49:30 nicm Exp $ */ +/* $OpenBSD: conf.h,v 1.116 2011/09/17 08:36:06 miod Exp $ */ /* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */ /*- @@ -392,11 +392,11 @@ extern struct cdevsw cdevsw[]; (dev_type_stop((*))) enodev, 0, selfalse, \ (dev_type_mmap((*))) enodev } -/* open, close, write, ioctl */ +/* open, close, write */ #define cdev_ulpt_init(c,n) { \ dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ - dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ - 0, selfalse, (dev_type_mmap((*))) enodev } + dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \ + (dev_type_stop((*))) enodev, 0, selfalse, (dev_type_mmap((*))) enodev } /* open, close, ioctl */ #define cdev_pf_init(c,n) { \ @@ -453,11 +453,11 @@ extern struct cdevsw cdevsw[]; 0, seltrue, (dev_type_mmap((*))) enodev, \ 0, 0, seltrue_kqfilter } -/* open, close, write, ioctl */ +/* open, close, write */ #define cdev_lpt_init(c,n) { \ dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ - dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ - 0, seltrue, (dev_type_mmap((*))) enodev, \ + dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \ + (dev_type_stop((*))) enodev, 0, seltrue, (dev_type_mmap((*))) enodev, \ 0, 0, seltrue_kqfilter } /* open, close, read, ioctl, mmap */ |