container.c 2.0 KB
Newer Older
L
Linus Torvalds 已提交
1
/*
2
 * container.c  - ACPI Generic Container Driver
L
Linus Torvalds 已提交
3 4 5 6 7
 *
 * Copyright (C) 2004 Anil S Keshavamurthy (anil.s.keshavamurthy@intel.com)
 * Copyright (C) 2004 Keiichiro Tokunaga (tokunaga.keiich@jp.fujitsu.com)
 * Copyright (C) 2004 Motoyuki Ito (motoyuki@soft.fujitsu.com)
 * Copyright (C) 2004 FUJITSU LIMITED
8 9
 * Copyright (C) 2004, 2013 Intel Corp.
 * Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
L
Linus Torvalds 已提交
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
 *
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or (at
 *  your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 *
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 */
#include <linux/acpi.h>
30 31

#include "internal.h"
L
Linus Torvalds 已提交
32

33 34
#define PREFIX "ACPI: "

L
Linus Torvalds 已提交
35
#define _COMPONENT			ACPI_CONTAINER_COMPONENT
36
ACPI_MODULE_NAME("container");
L
Linus Torvalds 已提交
37

38 39 40 41 42 43 44
static const struct acpi_device_id container_device_ids[] = {
	{"ACPI0004", 0},
	{"PNP0A05", 0},
	{"PNP0A06", 0},
	{"", 0},
};

45 46 47
static int container_device_attach(struct acpi_device *device,
				   const struct acpi_device_id *not_used)
{
48
	/* This is necessary for container hotplug to work. */
49 50 51 52
	return 1;
}

static struct acpi_scan_handler container_device_handler = {
53
	.ids = container_device_ids,
54
	.attach = container_device_attach,
55 56 57 58
	.hotplug = {
		.enabled = true,
		.mode = AHM_CONTAINER,
	},
L
Linus Torvalds 已提交
59 60
};

61
void __init acpi_container_init(void)
L
Linus Torvalds 已提交
62
{
63
	acpi_scan_add_handler(&container_device_handler);
L
Linus Torvalds 已提交
64
}