From a5e2778a7049a4475ecad7970852a60d8e6f3be9 Mon Sep 17 00:00:00 2001 From: nsouch Date: Sat, 23 Mar 2002 18:27:16 +0000 Subject: smbus_alloc_bus is not part of the smbus interface anymore --- sys/pci/amdpm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/pci/amdpm.c b/sys/pci/amdpm.c index cc4ff54..9664ce2 100644 --- a/sys/pci/amdpm.c +++ b/sys/pci/amdpm.c @@ -210,13 +210,15 @@ amdsmb_probe(device_t dev) { struct amdsmb_softc *amdsmb_sc = (struct amdsmb_softc *)device_get_softc(dev); + device_set_desc(dev, "AMD 756 SMBus interface"); + device_printf(dev, "AMD 756 SMBus interface\n"); + /* Allocate a new smbus device */ - amdsmb_sc->smbus = smbus_alloc_bus(dev); + amdsmb_sc->smbus = device_add_child(dev, "smbus", -1); if (!amdsmb_sc->smbus) return (EINVAL); - device_set_desc(dev, "AMD 756 SMBus interface"); - device_printf(dev, "AMD 756 SMBus interface\n"); + bus_generic_attach(dev); return (0); } @@ -634,3 +636,5 @@ static driver_t amdsmb_driver = { DRIVER_MODULE(amdpm, pci, amdpm_driver, amdpm_devclass, 0, 0); DRIVER_MODULE(amdsmb, amdpm, amdsmb_driver, amdsmb_devclass, 0, 0); +MODULE_DEPEND(amdpm, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER); +MODULE_VERSION(amdpm, 1); -- cgit v1.1