Deleted Added
full compact
acpi_toshiba.c (130511) acpi_toshiba.c (130534)
1/*-
2 * Copyright (c) 2003 Hiroyuki Aizu <aizu@navi.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

--- 12 unchanged lines hidden (view full) ---

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003 Hiroyuki Aizu <aizu@navi.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

--- 12 unchanged lines hidden (view full) ---

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_toshiba.c 130511 2004-06-15 02:17:23Z njl $");
29__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_toshiba.c 130534 2004-06-15 16:49:20Z njl $");
30
31#include "opt_acpi.h"
32#include <sys/param.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/bus.h>
36
37#include "acpi.h"

--- 486 unchanged lines hidden (view full) ---

524static int
525acpi_toshiba_video_probe(device_t dev)
526{
527 int ret = ENXIO;
528
529 if (!acpi_disabled("toshiba") &&
530 acpi_get_type(dev) == ACPI_TYPE_DEVICE &&
531 device_get_unit(dev) == 0 &&
30
31#include "opt_acpi.h"
32#include <sys/param.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/bus.h>
36
37#include "acpi.h"

--- 486 unchanged lines hidden (view full) ---

524static int
525acpi_toshiba_video_probe(device_t dev)
526{
527 int ret = ENXIO;
528
529 if (!acpi_disabled("toshiba") &&
530 acpi_get_type(dev) == ACPI_TYPE_DEVICE &&
531 device_get_unit(dev) == 0 &&
532 acpi_MatchHid(device_get_handle(dev), "TOS6201")) {
532 acpi_MatchHid(acpi_get_handle(dev), "TOS6201")) {
533 device_quiet(dev);
534 device_set_desc(dev, "Toshiba Video");
535 ret = 0;
536 }
537
538 return (ret);
539}
540
541static int
542acpi_toshiba_video_attach(device_t dev)
543{
544 struct acpi_toshiba_softc *sc;
545
546 sc = devclass_get_softc(acpi_toshiba_devclass, 0);
547 if (sc == NULL)
548 return (ENXIO);
549 sc->video_handle = acpi_get_handle(dev);
550 return (0);
551}
533 device_quiet(dev);
534 device_set_desc(dev, "Toshiba Video");
535 ret = 0;
536 }
537
538 return (ret);
539}
540
541static int
542acpi_toshiba_video_attach(device_t dev)
543{
544 struct acpi_toshiba_softc *sc;
545
546 sc = devclass_get_softc(acpi_toshiba_devclass, 0);
547 if (sc == NULL)
548 return (ENXIO);
549 sc->video_handle = acpi_get_handle(dev);
550 return (0);
551}