diff options
| author | riastradh <riastradh@NetBSD.org> | 2013-06-24 03:57:36 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2013-06-24 03:57:36 +0000 |
| commit | 8fcb059d64019ef3a03b90cb11f6c6d47aeeb6b9 (patch) | |
| tree | 25ffdf4c8c08d97d70483ad882e6004d8fe79221 /sys/dev/ic | |
| parent | d0775bdae00d1f0e89514af81bd986f17e365ad5 (diff) | |
Use static inline. Fixes i386/ALL and something else I've forgetten.
Diffstat (limited to 'sys/dev/ic')
| -rw-r--r-- | sys/dev/ic/bt463.c | 18 | ||||
| -rw-r--r-- | sys/dev/ic/bt485.c | 35 |
2 files changed, 25 insertions, 28 deletions
diff --git a/sys/dev/ic/bt463.c b/sys/dev/ic/bt463.c index 5091e6ab77b..0a785293321 100644 --- a/sys/dev/ic/bt463.c +++ b/sys/dev/ic/bt463.c @@ -1,4 +1,4 @@ -/* $NetBSD: bt463.c,v 1.16 2012/02/12 16:34:11 matt Exp $ */ +/* $NetBSD: bt463.c,v 1.17 2013/06/24 03:57:36 riastradh Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bt463.c,v 1.16 2012/02/12 16:34:11 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bt463.c,v 1.17 2013/06/24 03:57:36 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -171,10 +171,15 @@ static struct bt463data *console_data; /* * Internal functions. */ -inline void bt463_wraddr(struct bt463data *, u_int16_t); void bt463_update(void *); +static inline void +bt463_wraddr(struct bt463data *data, u_int16_t ireg) +{ + data->ramdac_wr(data->cookie, BT463_REG_ADDR_LOW, ireg & 0xff); + data->ramdac_wr(data->cookie, BT463_REG_ADDR_HIGH, (ireg >> 8) & 0xff); +} /*****************************************************************************/ @@ -538,13 +543,6 @@ bt463_copyback(void *p) } #endif -inline void -bt463_wraddr(struct bt463data *data, u_int16_t ireg) -{ - data->ramdac_wr(data->cookie, BT463_REG_ADDR_LOW, ireg & 0xff); - data->ramdac_wr(data->cookie, BT463_REG_ADDR_HIGH, (ireg >> 8) & 0xff); -} - void bt463_update(void *p) { diff --git a/sys/dev/ic/bt485.c b/sys/dev/ic/bt485.c index 267d579e3d2..e5d04ee9c12 100644 --- a/sys/dev/ic/bt485.c +++ b/sys/dev/ic/bt485.c @@ -1,4 +1,4 @@ -/* $NetBSD: bt485.c,v 1.16 2012/02/12 16:34:11 matt Exp $ */ +/* $NetBSD: bt485.c,v 1.17 2013/06/24 03:57:36 riastradh Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bt485.c,v 1.16 2012/02/12 16:34:11 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bt485.c,v 1.17 2013/06/24 03:57:36 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -117,11 +117,24 @@ struct bt485data { /* * Internal functions. */ -inline void bt485_wr_i (struct bt485data *, u_int8_t, u_int8_t); -inline u_int8_t bt485_rd_i(struct bt485data *, u_int8_t); + void bt485_update(void *); void bt485_update_curpos(struct bt485data *); +static inline void +bt485_wr_i(struct bt485data *data, u_int8_t ireg, u_int8_t val) +{ + data->ramdac_wr(data->cookie, BT485_REG_PCRAM_WRADDR, ireg); + data->ramdac_wr(data->cookie, BT485_REG_EXTENDED, val); +} + +static inline u_int8_t +bt485_rd_i(struct bt485data *data, u_int8_t ireg) +{ + data->ramdac_wr(data->cookie, BT485_REG_PCRAM_WRADDR, ireg); + return (data->ramdac_rd(data->cookie, BT485_REG_EXTENDED)); +} + /*****************************************************************************/ /* @@ -461,20 +474,6 @@ bt485_get_curmax(struct ramdac_cookie *rc, struct wsdisplay_curpos *curposp) * Internal functions. */ -inline void -bt485_wr_i(struct bt485data *data, u_int8_t ireg, u_int8_t val) -{ - data->ramdac_wr(data->cookie, BT485_REG_PCRAM_WRADDR, ireg); - data->ramdac_wr(data->cookie, BT485_REG_EXTENDED, val); -} - -inline u_int8_t -bt485_rd_i(struct bt485data *data, u_int8_t ireg) -{ - data->ramdac_wr(data->cookie, BT485_REG_PCRAM_WRADDR, ireg); - return (data->ramdac_rd(data->cookie, BT485_REG_EXTENDED)); -} - void bt485_update(void *vp) { |
