acpi_battery.c (9febbb407876db9da1238e5d1a575ce5bae2578b) | acpi_battery.c (3273b0052350a01f85ee60a6a2e31adb31d4a5a6) |
---|---|
1/*- 2 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@jp.freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 169 unchanged lines hidden (view full) --- 178 179static int 180acpi_battery_init(void) 181{ 182 device_t dev; 183 struct acpi_softc *sc; 184 int error; 185 | 1/*- 2 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@jp.freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 169 unchanged lines hidden (view full) --- 178 179static int 180acpi_battery_init(void) 181{ 182 device_t dev; 183 struct acpi_softc *sc; 184 int error; 185 |
186 if ((dev = devclass_get_device(acpi_devclass, 0)) == NULL) { | 186 if ((dev = devclass_get_device(devclass_find("acpi"), 0)) == NULL) { |
187 return (ENXIO); 188 } 189 if ((sc = device_get_softc(dev)) == NULL) { 190 return (ENXIO); 191 } 192 193 error = 0; 194 --- 68 unchanged lines hidden --- | 187 return (ENXIO); 188 } 189 if ((sc = device_get_softc(dev)) == NULL) { 190 return (ENXIO); 191 } 192 193 error = 0; 194 --- 68 unchanged lines hidden --- |