summaryrefslogtreecommitdiff
path: root/sys/dev/i2c/fintek.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-10-12 19:40:23 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-10-12 19:40:23 +0000
commit6b5d3cc8e5dde345ae4626d0064de9051fac466a (patch)
treee1a34cc6324bfd02eeb89b918c937a3589c72c31 /sys/dev/i2c/fintek.c
parente5a6632e636da1f39fb9f6a7513725c2972f66f2 (diff)
Do not compile sensor code if option SMALL_KERNEL
Diffstat (limited to 'sys/dev/i2c/fintek.c')
-rw-r--r--sys/dev/i2c/fintek.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/i2c/fintek.c b/sys/dev/i2c/fintek.c
index 6e799bd5d1b..d8457f7d0b6 100644
--- a/sys/dev/i2c/fintek.c
+++ b/sys/dev/i2c/fintek.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fintek.c,v 1.7 2007/10/31 20:46:17 cnst Exp $ */
+/* $OpenBSD: fintek.c,v 1.8 2014/10/12 19:40:22 miod Exp $ */
/*
* Copyright (c) 2006 Dale Rahn <drahn@openbsd.org>
*
@@ -38,8 +38,10 @@ struct fintek_softc {
i2c_tag_t sc_tag;
i2c_addr_t sc_addr;
+#ifndef SMALL_KERNEL
struct ksensor sc_sensor[F_NUM_SENSORS];
struct ksensordev sc_sensordev;
+#endif
};
int fintek_match(struct device *, void *, void *);
@@ -113,7 +115,9 @@ fintek_attach(struct device *parent, struct device *self, void *aux)
struct fintek_softc *sc = (struct fintek_softc *)self;
struct i2c_attach_args *ia = aux;
u_int8_t cmd, data;
+#ifndef SMALL_KERNEL
int i;
+#endif
sc->sc_tag = ia->ia_tag;
sc->sc_addr = ia->ia_addr;
@@ -138,6 +142,7 @@ fintek_attach(struct device *parent, struct device *self, void *aux)
iic_release_bus(sc->sc_tag, 0);
+#ifndef SMALL_KERNEL
strlcpy(sc->sc_sensordev.xname, sc->sc_dev.dv_xname,
sizeof(sc->sc_sensordev.xname));
@@ -163,6 +168,7 @@ fintek_attach(struct device *parent, struct device *self, void *aux)
for (i = 0; i < F_NUM_SENSORS; i++)
sensor_attach(&sc->sc_sensordev, &sc->sc_sensor[i]);
sensordev_install(&sc->sc_sensordev);
+#endif
printf("\n");
return;
@@ -174,6 +180,7 @@ failread:
}
+#ifndef SMALL_KERNEL
struct {
char sensor;
u_int8_t cmd;
@@ -245,6 +252,7 @@ fintek_refresh(void *arg)
iic_release_bus(sc->sc_tag, 0);
}
+#endif
void
fintek_fullspeed(struct fintek_softc *sc)