Skip to contentSkip to conversation

ACPI: Export acpi_check_resource_conflict() (update)

PATCH New Jean Delvare 1 participant 2 messages Nov 7, 2007 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: Export acpi_check_resource_conflict() (update)

Export acpi_check_resource_conflict(), sometimes drivers already have a struct resource at hand so no need to use the wrappers to build a new one.

---
This is an update of a patch I sent previously, so that it applies fine on top of the <linux/acpi.h> cleanup patch I just sent. Andrew, this replaces export-acpi_check_resource_conflict.patch in your tree.

 drivers/acpi/osl.c   |    3 ++-
 include/linux/acpi.h |    7 +++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
drivers/acpi/osl.c +2 -1
@@ -1097,7 +1097,7 @@ __setup("acpi_enforce_resources=", acpi_
 
 /* Check for resource conflicts between ACPI OperationRegions and native
  * drivers */
-static int acpi_check_resource_conflict(struct resource *res)
+int acpi_check_resource_conflict(struct resource *res)
 {
 	struct acpi_res_list *res_list_elem;
 	int ioport;
@@ -1147,6 +1147,7 @@ static int acpi_check_resource_conflict(
 	}
 	return 0;
 }
+EXPORT_SYMBOL(acpi_check_resource_conflict);
 
 int acpi_check_region(resource_size_t start, resource_size_t n,
 		      const char *name)
include/linux/acpi.h +7 -0
@@ -195,6 +195,8 @@ extern int pnpacpi_disabled;
 #define PXM_INVAL	(-1)
 #define NID_INVAL	(-1)
 
+int acpi_check_resource_conflict(struct resource *res);
+
 int acpi_check_region(resource_size_t start, resource_size_t n,
 		      const char *name);
 
@@ -213,6 +215,11 @@ static inline int acpi_boot_table_init(v
 	return 0;
 }
 
+static inline int acpi_check_resource_conflict(struct resource *res)
+{
+	return 0;
+}
+
 static inline int acpi_check_region(resource_size_t start, resource_size_t n,
 				    const char *name)
 {
Signature · 2 lines
Jean Delvare
Suse L3
#1 lore raw

PATCH 1/1 ACPI: Export acpi_check_resource_conflict() (update #2)

Export acpi_check_resource_conflict(), sometimes drivers already have a struct resource at hand so no need to use the wrappers to build a new one.

---
Resending, I had forgotten to "quilt refresh". Sorry for the noise. A missing include was causing warnings with CONFIG_ACPI=n.

 drivers/acpi/osl.c   |    3 ++-
 include/linux/acpi.h |    8 ++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
drivers/acpi/osl.c +2 -1
@@ -1097,7 +1097,7 @@ __setup("acpi_enforce_resources=", acpi_
 
 /* Check for resource conflicts between ACPI OperationRegions and native
  * drivers */
-static int acpi_check_resource_conflict(struct resource *res)
+int acpi_check_resource_conflict(struct resource *res)
 {
 	struct acpi_res_list *res_list_elem;
 	int ioport;
@@ -1147,6 +1147,7 @@ static int acpi_check_resource_conflict(
 	}
 	return 0;
 }
+EXPORT_SYMBOL(acpi_check_resource_conflict);
 
 int acpi_check_region(resource_size_t start, resource_size_t n,
 		      const char *name)
include/linux/acpi.h +8 -0
@@ -25,6 +25,7 @@
 #ifndef _LINUX_ACPI_H
 #define _LINUX_ACPI_H
 
+#include <linux/ioport.h>	/* for struct resource */
 
 #ifdef	CONFIG_ACPI
 
@@ -195,6 +196,8 @@ extern int pnpacpi_disabled;
 #define PXM_INVAL	(-1)
 #define NID_INVAL	(-1)
 
+int acpi_check_resource_conflict(struct resource *res);
+
 int acpi_check_region(resource_size_t start, resource_size_t n,
 		      const char *name);
 
@@ -213,6 +216,11 @@ static inline int acpi_boot_table_init(v
 	return 0;
 }
 
+static inline int acpi_check_resource_conflict(struct resource *res)
+{
+	return 0;
+}
+
 static inline int acpi_check_region(resource_size_t start, resource_size_t n,
 				    const char *name)
 {
Signature · 2 lines
Jean Delvare
Suse L3