1 /* $OpenBSD: conf.h,v 1.2 2007/01/29 14:18:00 aoyama Exp $ */ 2 /* 3 * Copyright (c) 2004, Miodrag Vallat. 4 * All rights reserved. 5 * 6 * Permission to redistribute, use, copy, and modify this software 7 * is hereby granted without fee, provided that the following 8 * conditions are met: 9 * 10 * 1. This entire notice is included in all source code copies of any 11 * software which is or includes a copy or modification of this 12 * software. 13 * 2. The name of the author may not be used to endorse or promote 14 * products derived from this software without specific prior 15 * written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 18 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 23 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30 #include <sys/conf.h> 31 32 #define mmread mmrw 33 #define mmwrite mmrw 34 cdev_decl(mm); 35 36 cdev_decl(sio); 37 38 cdev_decl(lcd); 39 40 /* open, close, write, ioctl */ 41 #define cdev_lcd_init(c,n) { \ 42 dev_init(c,n,open), dev_init(c,n,close), \ 43 (dev_type_read((*))) enodev, dev_init(c,n,write), \ 44 dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ 45 0, seltrue, (dev_type_mmap((*))) enodev } 46