Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/acpi.h
- This file was added.
/*- | |||||
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD | |||||
* | |||||
* Copyright (c) 2020 Vladimir Kondratyev <wulf@FreeBSD.org> | |||||
* | |||||
* Redistribution and use in source and binary forms, with or without | |||||
* modification, are permitted provided that the following conditions are | |||||
* met: | |||||
* 1. Redistributions of source code must retain the above copyright | |||||
* notice, this list of conditions and the following disclaimer. | |||||
* 2. Redistributions in binary form must reproduce the above copyright | |||||
* notice, this list of conditions and the following disclaimer in | |||||
* the documentation and/or other materials provided with the | |||||
* distribution. | |||||
* | |||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |||||
* SUCH DAMAGE. | |||||
* | |||||
* $FreeBSD$ | |||||
*/ | |||||
#ifndef _LINUX_ACPI_H_ | |||||
#define _LINUX_ACPI_H_ | |||||
#include <linux/device.h> | |||||
#include <acpi/acpi.h> | |||||
#include <acpi/acpi_bus.h> | |||||
#define ACPI_HANDLE(dev) \ | |||||
((dev)->bsddev != NULL ? bsd_acpi_get_handle((dev)->bsddev) : NULL) | |||||
#endif /* _LINUX_ACPI_H_ */ | |||||
bz: Not sure if any of this is needed; I have come across things demanding something like this… | |||||
Not Done Inline ActionsNot sure if what is needed ? manu: Not sure if what is needed ?
ACPI_HANDLE is used in drm-kmod and is needed.
Not sure I… | |||||
Not Done Inline ActionsThe block of code I pasted in above... Did I just need that or do we inherit that from FreeBSD's ACPI implementation ... or would that break anything in yours? bz: The block of code I pasted in above... Did I just need that or do we inherit that from… | |||||
Not Done Inline ActionsI don't understand. manu: I don't understand.
What's in this review is the only thing needed for drm, maybe you need more… | |||||
Not Done Inline Actionsdokioki. I just wanted to make sure it's not going to break your stuff later. bz: dokioki. I just wanted to make sure it's not going to break your stuff later. | |||||
Not Done Inline ActionsI have no idea if it will break things or not, you can try yourself. manu: I have no idea if it will break things or not, you can try yourself.
I'm going to commit this… |
Not sure if any of this is needed; I have come across things demanding something like this with not all types figured out (yet). Will this collide with anything?