1dab39c11SEmmanuel Vadot /*- 2dab39c11SEmmanuel Vadot * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3dab39c11SEmmanuel Vadot * 4dab39c11SEmmanuel Vadot * Copyright (c) 2020 Vladimir Kondratyev <wulf@FreeBSD.org> 5dab39c11SEmmanuel Vadot * 6dab39c11SEmmanuel Vadot * Redistribution and use in source and binary forms, with or without 7dab39c11SEmmanuel Vadot * modification, are permitted provided that the following conditions are 8dab39c11SEmmanuel Vadot * met: 9dab39c11SEmmanuel Vadot * 1. Redistributions of source code must retain the above copyright 10dab39c11SEmmanuel Vadot * notice, this list of conditions and the following disclaimer. 11dab39c11SEmmanuel Vadot * 2. Redistributions in binary form must reproduce the above copyright 12dab39c11SEmmanuel Vadot * notice, this list of conditions and the following disclaimer in 13dab39c11SEmmanuel Vadot * the documentation and/or other materials provided with the 14dab39c11SEmmanuel Vadot * distribution. 15dab39c11SEmmanuel Vadot * 16dab39c11SEmmanuel Vadot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17dab39c11SEmmanuel Vadot * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18dab39c11SEmmanuel Vadot * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19dab39c11SEmmanuel Vadot * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20dab39c11SEmmanuel Vadot * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21dab39c11SEmmanuel Vadot * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22dab39c11SEmmanuel Vadot * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23dab39c11SEmmanuel Vadot * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24dab39c11SEmmanuel Vadot * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25dab39c11SEmmanuel Vadot * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26dab39c11SEmmanuel Vadot * SUCH DAMAGE. 27dab39c11SEmmanuel Vadot * 28dab39c11SEmmanuel Vadot * $FreeBSD$ 29dab39c11SEmmanuel Vadot */ 30dab39c11SEmmanuel Vadot 31dab39c11SEmmanuel Vadot #ifndef _LINUX_ACPI_H_ 32dab39c11SEmmanuel Vadot #define _LINUX_ACPI_H_ 33dab39c11SEmmanuel Vadot 34dab39c11SEmmanuel Vadot #include <linux/device.h> 35dab39c11SEmmanuel Vadot 36*146e176dSVladimir Kondratyev #if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) 37*146e176dSVladimir Kondratyev 38dab39c11SEmmanuel Vadot #include <acpi/acpi.h> 39dab39c11SEmmanuel Vadot #include <acpi/acpi_bus.h> 40dab39c11SEmmanuel Vadot 41dab39c11SEmmanuel Vadot #define ACPI_HANDLE(dev) \ 42dab39c11SEmmanuel Vadot ((dev)->bsddev != NULL ? bsd_acpi_get_handle((dev)->bsddev) : NULL) 43dab39c11SEmmanuel Vadot 44*146e176dSVladimir Kondratyev #endif 45*146e176dSVladimir Kondratyev 46dab39c11SEmmanuel Vadot #endif /* _LINUX_ACPI_H_ */ 47