Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Use static inline. Fixes i386/ALL and something ...
details: https://anonhg.NetBSD.org/src/rev/5323e89ad8cf
branches: trunk
changeset: 787563:5323e89ad8cf
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Jun 24 03:57:36 2013 +0000
description:
Use static inline. Fixes i386/ALL and something else I've forgetten.
diffstat:
sys/dev/ic/bt463.c | 18 ++++++++----------
sys/dev/ic/bt485.c | 35 +++++++++++++++++------------------
2 files changed, 25 insertions(+), 28 deletions(-)
diffs (115 lines):
diff -r 6d37560a3302 -r 5323e89ad8cf sys/dev/ic/bt463.c
--- a/sys/dev/ic/bt463.c Mon Jun 24 01:12:08 2013 +0000
+++ b/sys/dev/ic/bt463.c Mon Jun 24 03:57:36 2013 +0000
@@ -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 @@
/*
* 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 @@
}
#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 -r 6d37560a3302 -r 5323e89ad8cf sys/dev/ic/bt485.c
--- a/sys/dev/ic/bt485.c Mon Jun 24 01:12:08 2013 +0000
+++ b/sys/dev/ic/bt485.c Mon Jun 24 03:57:36 2013 +0000
@@ -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 @@
/*
* 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 @@
* 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)
{
Home |
Main Index |
Thread Index |
Old Index