dpms.c (199230) | dpms.c (200584) |
---|---|
1/*- 2 * Copyright (c) 2008 Yahoo!, Inc. 3 * All rights reserved. 4 * Written by: John Baldwin <jhb@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 45 unchanged lines hidden (view full) --- 54 * SUCH DAMAGE. 55 */ 56 57/* 58 * Support for managing the display via DPMS for suspend/resume. 59 */ 60 61#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008 Yahoo!, Inc. 3 * All rights reserved. 4 * Written by: John Baldwin <jhb@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 45 unchanged lines hidden (view full) --- 54 * SUCH DAMAGE. 55 */ 56 57/* 58 * Support for managing the display via DPMS for suspend/resume. 59 */ 60 61#include <sys/cdefs.h> |
62__FBSDID("$FreeBSD: head/sys/dev/dpms/dpms.c 199230 2009-11-12 18:16:35Z jkim $"); | 62__FBSDID("$FreeBSD: head/sys/dev/dpms/dpms.c 200584 2009-12-15 19:58:23Z jkim $"); |
63 64#include <sys/param.h> 65#include <sys/bus.h> 66#include <sys/kernel.h> 67#include <sys/libkern.h> 68#include <sys/module.h> 69 70#include <compat/x86bios/x86bios.h> --- 42 unchanged lines hidden (view full) --- 113static driver_t dpms_driver = { 114 "dpms", 115 dpms_methods, 116 sizeof(struct dpms_softc), 117}; 118 119static devclass_t dpms_devclass; 120 | 63 64#include <sys/param.h> 65#include <sys/bus.h> 66#include <sys/kernel.h> 67#include <sys/libkern.h> 68#include <sys/module.h> 69 70#include <compat/x86bios/x86bios.h> --- 42 unchanged lines hidden (view full) --- 113static driver_t dpms_driver = { 114 "dpms", 115 dpms_methods, 116 sizeof(struct dpms_softc), 117}; 118 119static devclass_t dpms_devclass; 120 |
121DRIVER_MODULE(dpms, vgapci, dpms_driver, dpms_devclass, NULL, NULL); | 121DRIVER_MODULE(dpms, vgapm, dpms_driver, dpms_devclass, NULL, NULL); |
122MODULE_DEPEND(dpms, x86bios, 1, 1, 1); 123 124static void 125dpms_identify(driver_t *driver, device_t parent) 126{ 127 | 122MODULE_DEPEND(dpms, x86bios, 1, 1, 1); 123 124static void 125dpms_identify(driver_t *driver, device_t parent) 126{ 127 |
128 if (device_get_flags(parent) != 0 && 129 x86bios_match_device(0xc0000, parent)) | 128 if (x86bios_match_device(0xc0000, device_get_parent(parent))) |
130 device_add_child(parent, "dpms", 0); 131} 132 133static int 134dpms_probe(device_t dev) 135{ 136 int error, states; 137 --- 94 unchanged lines hidden --- | 129 device_add_child(parent, "dpms", 0); 130} 131 132static int 133dpms_probe(device_t dev) 134{ 135 int error, states; 136 --- 94 unchanged lines hidden --- |