diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-01-15 22:03:18 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-01-15 22:03:18 +0000 |
commit | a1b8555a256d86e34f41f9829dc7a4f2397a7fc8 (patch) | |
tree | 11dced877188951f84909a67ab7de72929447a10 /sys/dev/i2c | |
parent | fddd2ea453bc08280eb864b7b1d12971a179c40d (diff) |
Commit missing bits too:
If we attach an lm(4) to isa(4) that is already attached to iic(4), disable
the one attached to iic(4).
idea from deraadt@
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r-- | sys/dev/i2c/lm_i2c.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/i2c/lm_i2c.c b/sys/dev/i2c/lm_i2c.c index bf826a5556d..8cf2b4a1071 100644 --- a/sys/dev/i2c/lm_i2c.c +++ b/sys/dev/i2c/lm_i2c.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lm_i2c.c,v 1.7 2006/01/14 15:14:33 kettenis Exp $ */ +/* $OpenBSD: lm_i2c.c,v 1.8 2006/01/15 22:03:17 kettenis Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -80,6 +80,9 @@ lm_i2c_attach(struct device *parent, struct device *self, void *aux) sc->sc_lmsc.lm_readreg = lm_i2c_readreg; lm_attach(&sc->sc_lmsc); + /* Remember we attached to iic(4). */ + sc->sc_lmsc.sbusaddr = ia->ia_addr; + iic_acquire_bus(sc->sc_tag, 0); cmd = 0x4a; |