Deleted Added
full compact
acpi.c (212172) acpi.c (212413)
1/*-
2 * Copyright (c) 2000 Takanori Watanabe <takawata@jp.freebsd.org>
3 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
4 * Copyright (c) 2000, 2001 Michael Smith
5 * Copyright (c) 2000 BSDi
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000 Takanori Watanabe <takawata@jp.freebsd.org>
3 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
4 * Copyright (c) 2000, 2001 Michael Smith
5 * Copyright (c) 2000 BSDi
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi.c 212172 2010-09-03 08:07:04Z avg $");
31__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi.c 212413 2010-09-10 11:19:03Z avg $");
32
33#include "opt_acpi.h"
34#include <sys/param.h>
35#include <sys/kernel.h>
36#include <sys/proc.h>
37#include <sys/fcntl.h>
38#include <sys/malloc.h>
39#include <sys/module.h>

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

100static BOOLEAN acpi_sleep_states[ACPI_S_STATE_COUNT];
101
102static int acpi_modevent(struct module *mod, int event, void *junk);
103static int acpi_probe(device_t dev);
104static int acpi_attach(device_t dev);
105static int acpi_suspend(device_t dev);
106static int acpi_resume(device_t dev);
107static int acpi_shutdown(device_t dev);
32
33#include "opt_acpi.h"
34#include <sys/param.h>
35#include <sys/kernel.h>
36#include <sys/proc.h>
37#include <sys/fcntl.h>
38#include <sys/malloc.h>
39#include <sys/module.h>

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

100static BOOLEAN acpi_sleep_states[ACPI_S_STATE_COUNT];
101
102static int acpi_modevent(struct module *mod, int event, void *junk);
103static int acpi_probe(device_t dev);
104static int acpi_attach(device_t dev);
105static int acpi_suspend(device_t dev);
106static int acpi_resume(device_t dev);
107static int acpi_shutdown(device_t dev);
108static device_t acpi_add_child(device_t bus, int order, const char *name,
108static device_t acpi_add_child(device_t bus, u_int order, const char *name,
109 int unit);
110static int acpi_print_child(device_t bus, device_t child);
111static void acpi_probe_nomatch(device_t bus, device_t child);
112static void acpi_driver_added(device_t dev, driver_t *driver);
113static int acpi_read_ivar(device_t dev, device_t child, int index,
114 uintptr_t *result);
115static int acpi_write_ivar(device_t dev, device_t child, int index,
116 uintptr_t value);

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

776
777 return (0);
778}
779
780/*
781 * Handle a new device being added
782 */
783static device_t
109 int unit);
110static int acpi_print_child(device_t bus, device_t child);
111static void acpi_probe_nomatch(device_t bus, device_t child);
112static void acpi_driver_added(device_t dev, driver_t *driver);
113static int acpi_read_ivar(device_t dev, device_t child, int index,
114 uintptr_t *result);
115static int acpi_write_ivar(device_t dev, device_t child, int index,
116 uintptr_t value);

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

776
777 return (0);
778}
779
780/*
781 * Handle a new device being added
782 */
783static device_t
784acpi_add_child(device_t bus, int order, const char *name, int unit)
784acpi_add_child(device_t bus, u_int order, const char *name, int unit)
785{
786 struct acpi_device *ad;
787 device_t child;
788
789 if ((ad = malloc(sizeof(*ad), M_ACPIDEV, M_NOWAIT | M_ZERO)) == NULL)
790 return (NULL);
791
792 resource_list_init(&ad->ad_rl);

--- 2806 unchanged lines hidden ---
785{
786 struct acpi_device *ad;
787 device_t child;
788
789 if ((ad = malloc(sizeof(*ad), M_ACPIDEV, M_NOWAIT | M_ZERO)) == NULL)
790 return (NULL);
791
792 resource_list_init(&ad->ad_rl);

--- 2806 unchanged lines hidden ---