intpm: minor issues in debug printing
Andriy Gapon
avg at icyb.net.ua
Sun May 11 21:02:23 UTC 2008
I've recently performed some hacking of SMBus-attached peripherals in
PIIX4-based system and I haven't always been nice to the bus. While
doing that I noticed two very minor issues with printing in intpm.c.
I got "mysterious" messages like the following:
unknown: unknown cause why?
[Two "unknowns" is too much :-)]
The attached patch should fix that.
--
Andriy Gapon
-------------- next part --------------
diff --git a/sys/pci/intpm.c b/sys/pci/intpm.c
index 2e5e815..3cae6cc 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);
}
}
More information about the freebsd-acpi
mailing list