From d07a0d1d4ca1e9f19027bd74ba248311f36d3eaf Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 12 May 2008 21:34:52 +0000 Subject: [PATCH] - Set sc->dev to the new-bus device_t so all the device_printf()s work. - Add a missing newline to a printf. MFC after: 1 week Submitted by: Andriy Gapon avg <> icyb.net.ua --- sys/pci/intpm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/pci/intpm.c b/sys/pci/intpm.c index 2e5e815b5a44..3cae6cc6a2eb 100644 --- a/sys/pci/intpm.c +++ b/sys/pci/intpm.c @@ -110,6 +110,8 @@ intsmb_attach(device_t dev) int error, rid, value; char *str; + sc->dev = dev; + mtx_init(&sc->lock, device_get_nameunit(dev), "intsmb", MTX_DEF); rid = PCI_BASE_ADDR_SMB; @@ -410,7 +412,7 @@ intsmb_stop_poll(struct intsmb_softc *sc) sc->isbusy = 0; error = intsmb_error(status); if (error == 0 && !(status & PIIX4_SMBHSTSTAT_INTR)) - device_printf(sc->dev, "unknown cause why?"); + device_printf(sc->dev, "unknown cause why?\n"); return (error); } }