Staging: hv: Use generic device_driver probe function
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / linux / sfi_acpi.h
blobc4a5a8cd446932b7e035bd3505a570d59c8e2ef4
1 /* sfi.h Simple Firmware Interface */
3 /*
5 This file is provided under a dual BSD/GPLv2 license. When using or
6 redistributing this file, you may do so under either license.
8 GPL LICENSE SUMMARY
10 Copyright(c) 2009 Intel Corporation. All rights reserved.
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of version 2 of the GNU General Public License as
14 published by the Free Software Foundation.
16 This program is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
24 The full GNU General Public License is included in this distribution
25 in the file called LICENSE.GPL.
27 BSD LICENSE
29 Copyright(c) 2009 Intel Corporation. All rights reserved.
31 Redistribution and use in source and binary forms, with or without
32 modification, are permitted provided that the following conditions
33 are met:
35 * Redistributions of source code must retain the above copyright
36 notice, this list of conditions and the following disclaimer.
37 * Redistributions in binary form must reproduce the above copyright
38 notice, this list of conditions and the following disclaimer in
39 the documentation and/or other materials provided with the
40 distribution.
41 * Neither the name of Intel Corporation nor the names of its
42 contributors may be used to endorse or promote products derived
43 from this software without specific prior written permission.
45 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
46 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
47 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
48 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
49 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
50 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
51 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
52 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
53 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
54 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
55 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
59 #ifndef _LINUX_SFI_ACPI_H
60 #define _LINUX_SFI_ACPI_H
62 #ifdef CONFIG_SFI
63 #include <acpi/acpi.h> /* struct acpi_table_header */
65 extern int sfi_acpi_table_parse(char *signature, char *oem_id,
66 char *oem_table_id,
67 int (*handler)(struct acpi_table_header *));
69 static inline int acpi_sfi_table_parse(char *signature,
70 int (*handler)(struct acpi_table_header *))
72 if (!acpi_table_parse(signature, handler))
73 return 0;
75 return sfi_acpi_table_parse(signature, NULL, NULL, handler);
77 #else /* !CONFIG_SFI */
79 static inline int sfi_acpi_table_parse(char *signature, char *oem_id,
80 char *oem_table_id,
81 int (*handler)(struct acpi_table_header *))
83 return -1;
86 static inline int acpi_sfi_table_parse(char *signature,
87 int (*handler)(struct acpi_table_header *))
89 return acpi_table_parse(signature, handler);
91 #endif /* !CONFIG_SFI */
93 #endif /*_LINUX_SFI_ACPI_H*/