From 9bb24f6920b6952cde8e5fb568f60385d2b280aa Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Sun, 12 Nov 2017 23:19:39 +0000 Subject: [PATCH] linux: fix GPL licence issue in kernel breaking xf86-video-nvidia https://lkml.org/lkml/2017/9/15/499 --- ...HANDLE-encapsulate-fwnode_operations.patch | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 packages/linux/patches/default/linux-999-unbreak-ACPI_HANDLE-encapsulate-fwnode_operations.patch diff --git a/packages/linux/patches/default/linux-999-unbreak-ACPI_HANDLE-encapsulate-fwnode_operations.patch b/packages/linux/patches/default/linux-999-unbreak-ACPI_HANDLE-encapsulate-fwnode_operations.patch new file mode 100644 index 0000000000..d83ba025f6 --- /dev/null +++ b/packages/linux/patches/default/linux-999-unbreak-ACPI_HANDLE-encapsulate-fwnode_operations.patch @@ -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 + + \ No newline at end of file