mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
linux: fix GPL licence issue in kernel breaking xf86-video-nvidia
https://lkml.org/lkml/2017/9/15/499
This commit is contained in:
parent
d843f694f0
commit
9bb24f6920
@ -0,0 +1,68 @@
|
|||||||
|
---
|
||||||
|
drivers/acpi/property.c | 13 +++++++++++++
|
||||||
|
include/acpi/acpi_bus.h | 18 ++++--------------
|
||||||
|
2 files changed, 17 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
|
||||||
|
index c1c216163de3..1e3c2517a1ac 100644
|
||||||
|
--- a/drivers/acpi/property.c
|
||||||
|
+++ b/drivers/acpi/property.c
|
||||||
|
@@ -1293,3 +1293,16 @@ static int acpi_fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
|
||||||
|
DECLARE_ACPI_FWNODE_OPS(acpi_device_fwnode_ops);
|
||||||
|
DECLARE_ACPI_FWNODE_OPS(acpi_data_fwnode_ops);
|
||||||
|
const struct fwnode_operations acpi_static_fwnode_ops;
|
||||||
|
+
|
||||||
|
+bool is_acpi_device_node(const struct fwnode_handle *fwnode)
|
||||||
|
+{
|
||||||
|
+ return !IS_ERR_OR_NULL(fwnode) &&
|
||||||
|
+ fwnode->ops == &acpi_device_fwnode_ops;
|
||||||
|
+}
|
||||||
|
+EXPORT_SYMBOL(is_acpi_device_node);
|
||||||
|
+
|
||||||
|
+bool is_acpi_data_node(const struct fwnode_handle *fwnode)
|
||||||
|
+{
|
||||||
|
+ return !IS_ERR_OR_NULL(fwnode) && fwnode->ops == &acpi_data_fwnode_ops;
|
||||||
|
+}
|
||||||
|
+EXPORT_SYMBOL(is_acpi_data_node);
|
||||||
|
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
|
||||||
|
index dedf9d789166..fa1505292f6c 100644
|
||||||
|
--- a/include/acpi/acpi_bus.h
|
||||||
|
+++ b/include/acpi/acpi_bus.h
|
||||||
|
@@ -399,17 +399,12 @@ extern const struct fwnode_operations acpi_device_fwnode_ops;
|
||||||
|
extern const struct fwnode_operations acpi_data_fwnode_ops;
|
||||||
|
extern const struct fwnode_operations acpi_static_fwnode_ops;
|
||||||
|
|
||||||
|
+bool is_acpi_device_node(const struct fwnode_handle *fwnode);
|
||||||
|
+bool is_acpi_data_node(const struct fwnode_handle *fwnode);
|
||||||
|
+
|
||||||
|
static inline bool is_acpi_node(const struct fwnode_handle *fwnode)
|
||||||
|
{
|
||||||
|
- return !IS_ERR_OR_NULL(fwnode) &&
|
||||||
|
- (fwnode->ops == &acpi_device_fwnode_ops
|
||||||
|
- || fwnode->ops == &acpi_data_fwnode_ops);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static inline bool is_acpi_device_node(const struct fwnode_handle *fwnode)
|
||||||
|
-{
|
||||||
|
- return !IS_ERR_OR_NULL(fwnode) &&
|
||||||
|
- fwnode->ops == &acpi_device_fwnode_ops;
|
||||||
|
+ return (is_acpi_device_node(fwnode) || is_acpi_data_node(fwnode));
|
||||||
|
}
|
||||||
|
|
||||||
|
#define to_acpi_device_node(__fwnode) \
|
||||||
|
@@ -422,11 +417,6 @@ static inline bool is_acpi_device_node(const struct fwnode_handle *fwnode)
|
||||||
|
NULL; \
|
||||||
|
})
|
||||||
|
|
||||||
|
-static inline bool is_acpi_data_node(const struct fwnode_handle *fwnode)
|
||||||
|
-{
|
||||||
|
- return !IS_ERR_OR_NULL(fwnode) && fwnode->ops == &acpi_data_fwnode_ops;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
#define to_acpi_data_node(__fwnode) \
|
||||||
|
({ \
|
||||||
|
typeof(__fwnode) __to_acpi_data_node_fwnode = __fwnode; \
|
||||||
|
--
|
||||||
|
2.14.1
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user