aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/Kconfig12
-rw-r--r--drivers/acpi/bay.c4
-rw-r--r--drivers/acpi/bus.c1
-rw-r--r--drivers/acpi/dock.c8
-rw-r--r--drivers/acpi/glue.c4
-rw-r--r--drivers/acpi/numa.c3
-rw-r--r--drivers/acpi/osl.c18
-rw-r--r--drivers/acpi/pci_bind.c4
-rw-r--r--drivers/acpi/pci_irq.c2
-rw-r--r--drivers/acpi/pci_link.c2
-rw-r--r--drivers/acpi/sbs.c2
-rw-r--r--drivers/acpi/sbshc.c4
-rw-r--r--drivers/acpi/scan.c10
13 files changed, 27 insertions, 47 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 0065f3794576..d141bdb3a7d4 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -68,26 +68,28 @@ config ACPI_PROCFS
68 68
69 Say N to delete /proc/acpi/ files that have moved to /sys/ 69 Say N to delete /proc/acpi/ files that have moved to /sys/
70config ACPI_PROCFS_POWER 70config ACPI_PROCFS_POWER
71 bool "Deprecated power /proc/acpi folders" 71 bool "Deprecated power /proc/acpi directories"
72 depends on PROC_FS 72 depends on PROC_FS
73 default y 73 default y
74 ---help--- 74 ---help---
75 For backwards compatibility, this option allows 75 For backwards compatibility, this option allows
76 deprecated power /proc/acpi/ folders to exist, even when 76 deprecated power /proc/acpi/ directories to exist, even when
77 they have been replaced by functions in /sys. 77 they have been replaced by functions in /sys.
78 The deprecated folders (and their replacements) include: 78 The deprecated directories (and their replacements) include:
79 /proc/acpi/battery/* (/sys/class/power_supply/*) 79 /proc/acpi/battery/* (/sys/class/power_supply/*)
80 /proc/acpi/ac_adapter/* (sys/class/power_supply/*) 80 /proc/acpi/ac_adapter/* (sys/class/power_supply/*)
81 This option has no effect on /proc/acpi/ folders 81 This option has no effect on /proc/acpi/ directories
82 and functions, which do not yet exist in /sys 82 and functions, which do not yet exist in /sys
83 83
84 Say N to delete power /proc/acpi/ folders that have moved to /sys/ 84 Say N to delete power /proc/acpi/ directories that have moved to /sys/
85
85config ACPI_SYSFS_POWER 86config ACPI_SYSFS_POWER
86 bool "Future power /sys interface" 87 bool "Future power /sys interface"
87 select POWER_SUPPLY 88 select POWER_SUPPLY
88 default y 89 default y
89 ---help--- 90 ---help---
90 Say N to disable power /sys interface 91 Say N to disable power /sys interface
92
91config ACPI_PROC_EVENT 93config ACPI_PROC_EVENT
92 bool "Deprecated /proc/acpi/event support" 94 bool "Deprecated /proc/acpi/event support"
93 depends on PROC_FS 95 depends on PROC_FS
diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c
index 477711435b24..1fa86811b8ee 100644
--- a/drivers/acpi/bay.c
+++ b/drivers/acpi/bay.c
@@ -134,7 +134,7 @@ static ssize_t show_present(struct device *dev,
134 return snprintf(buf, PAGE_SIZE, "%d\n", bay_present(bay)); 134 return snprintf(buf, PAGE_SIZE, "%d\n", bay_present(bay));
135 135
136} 136}
137DEVICE_ATTR(present, S_IRUGO, show_present, NULL); 137static DEVICE_ATTR(present, S_IRUGO, show_present, NULL);
138 138
139/* 139/*
140 * write_eject - write method for "eject" file in sysfs 140 * write_eject - write method for "eject" file in sysfs
@@ -150,7 +150,7 @@ static ssize_t write_eject(struct device *dev, struct device_attribute *attr,
150 eject_device(bay->handle); 150 eject_device(bay->handle);
151 return count; 151 return count;
152} 152}
153DEVICE_ATTR(eject, S_IWUSR, NULL, write_eject); 153static DEVICE_ATTR(eject, S_IWUSR, NULL, write_eject);
154 154
155/** 155/**
156 * is_ata - see if a device is an ata device 156 * is_ata - see if a device is an ata device
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 8df325dafe0f..8b0d4b7d188a 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -391,7 +391,6 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
391 return 0; 391 return 0;
392} 392}
393 393
394EXPORT_SYMBOL(acpi_bus_receive_event);
395#endif /* CONFIG_ACPI_PROC_EVENT */ 394#endif /* CONFIG_ACPI_PROC_EVENT */
396 395
397/* -------------------------------------------------------------------------- 396/* --------------------------------------------------------------------------
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index b3dec2101e2e..307cef65c247 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -686,7 +686,7 @@ static ssize_t show_docked(struct device *dev,
686 return snprintf(buf, PAGE_SIZE, "%d\n", dock_present(dock_station)); 686 return snprintf(buf, PAGE_SIZE, "%d\n", dock_present(dock_station));
687 687
688} 688}
689DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); 689static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL);
690 690
691/* 691/*
692 * show_flags - read method for flags file in sysfs 692 * show_flags - read method for flags file in sysfs
@@ -697,7 +697,7 @@ static ssize_t show_flags(struct device *dev,
697 return snprintf(buf, PAGE_SIZE, "%d\n", dock_station->flags); 697 return snprintf(buf, PAGE_SIZE, "%d\n", dock_station->flags);
698 698
699} 699}
700DEVICE_ATTR(flags, S_IRUGO, show_flags, NULL); 700static DEVICE_ATTR(flags, S_IRUGO, show_flags, NULL);
701 701
702/* 702/*
703 * write_undock - write method for "undock" file in sysfs 703 * write_undock - write method for "undock" file in sysfs
@@ -713,7 +713,7 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr,
713 ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST); 713 ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST);
714 return ret ? ret: count; 714 return ret ? ret: count;
715} 715}
716DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock); 716static DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock);
717 717
718/* 718/*
719 * show_dock_uid - read method for "uid" file in sysfs 719 * show_dock_uid - read method for "uid" file in sysfs
@@ -729,7 +729,7 @@ static ssize_t show_dock_uid(struct device *dev,
729 729
730 return snprintf(buf, PAGE_SIZE, "%lx\n", lbuf); 730 return snprintf(buf, PAGE_SIZE, "%lx\n", lbuf);
731} 731}
732DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL); 732static DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL);
733 733
734/** 734/**
735 * dock_add - add a new dock station 735 * dock_add - add a new dock station
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 4893e256e399..eda0978b57c6 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -36,8 +36,6 @@ int register_acpi_bus_type(struct acpi_bus_type *type)
36 return -ENODEV; 36 return -ENODEV;
37} 37}
38 38
39EXPORT_SYMBOL(register_acpi_bus_type);
40
41int unregister_acpi_bus_type(struct acpi_bus_type *type) 39int unregister_acpi_bus_type(struct acpi_bus_type *type)
42{ 40{
43 if (acpi_disabled) 41 if (acpi_disabled)
@@ -53,8 +51,6 @@ int unregister_acpi_bus_type(struct acpi_bus_type *type)
53 return -ENODEV; 51 return -ENODEV;
54} 52}
55 53
56EXPORT_SYMBOL(unregister_acpi_bus_type);
57
58static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type) 54static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type)
59{ 55{
60 struct acpi_bus_type *tmp, *ret = NULL; 56 struct acpi_bus_type *tmp, *ret = NULL;
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index 0822d9fc1cb4..5d59cb33b1a5 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -78,6 +78,7 @@ int acpi_map_pxm_to_node(int pxm)
78 return node; 78 return node;
79} 79}
80 80
81#if 0
81void __cpuinit acpi_unmap_pxm_to_node(int node) 82void __cpuinit acpi_unmap_pxm_to_node(int node)
82{ 83{
83 int pxm = node_to_pxm_map[node]; 84 int pxm = node_to_pxm_map[node];
@@ -85,6 +86,7 @@ void __cpuinit acpi_unmap_pxm_to_node(int node)
85 node_to_pxm_map[node] = PXM_INVAL; 86 node_to_pxm_map[node] = PXM_INVAL;
86 node_clear(node, nodes_found_map); 87 node_clear(node, nodes_found_map);
87} 88}
89#endif /* 0 */
88 90
89static void __init 91static void __init
90acpi_table_print_srat_entry(struct acpi_subtable_header *header) 92acpi_table_print_srat_entry(struct acpi_subtable_header *header)
@@ -247,7 +249,6 @@ int acpi_get_pxm(acpi_handle h)
247 } while (ACPI_SUCCESS(status)); 249 } while (ACPI_SUCCESS(status));
248 return -1; 250 return -1;
249} 251}
250EXPORT_SYMBOL(acpi_get_pxm);
251 252
252int acpi_get_node(acpi_handle *handle) 253int acpi_get_node(acpi_handle *handle)
253{ 254{
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 6f49f6437289..c2c585366fa6 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -233,8 +233,6 @@ void acpi_os_printf(const char *fmt, ...)
233 va_end(args); 233 va_end(args);
234} 234}
235 235
236EXPORT_SYMBOL(acpi_os_printf);
237
238void acpi_os_vprintf(const char *fmt, va_list args) 236void acpi_os_vprintf(const char *fmt, va_list args)
239{ 237{
240 static char buffer[512]; 238 static char buffer[512];
@@ -413,8 +411,6 @@ void acpi_os_sleep(acpi_integer ms)
413 schedule_timeout_interruptible(msecs_to_jiffies(ms)); 411 schedule_timeout_interruptible(msecs_to_jiffies(ms));
414} 412}
415 413
416EXPORT_SYMBOL(acpi_os_sleep);
417
418void acpi_os_stall(u32 us) 414void acpi_os_stall(u32 us)
419{ 415{
420 while (us) { 416 while (us) {
@@ -428,8 +424,6 @@ void acpi_os_stall(u32 us)
428 } 424 }
429} 425}
430 426
431EXPORT_SYMBOL(acpi_os_stall);
432
433/* 427/*
434 * Support ACPI 3.0 AML Timer operand 428 * Support ACPI 3.0 AML Timer operand
435 * Returns 64-bit free-running, monotonically increasing timer 429 * Returns 64-bit free-running, monotonically increasing timer
@@ -579,8 +573,6 @@ acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
579 return (result ? AE_ERROR : AE_OK); 573 return (result ? AE_ERROR : AE_OK);
580} 574}
581 575
582EXPORT_SYMBOL(acpi_os_read_pci_configuration);
583
584acpi_status 576acpi_status
585acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg, 577acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
586 acpi_integer value, u32 width) 578 acpi_integer value, u32 width)
@@ -796,8 +788,6 @@ acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle)
796 return AE_OK; 788 return AE_OK;
797} 789}
798 790
799EXPORT_SYMBOL(acpi_os_create_semaphore);
800
801/* 791/*
802 * TODO: A better way to delete semaphores? Linux doesn't have a 792 * TODO: A better way to delete semaphores? Linux doesn't have a
803 * 'delete_semaphore()' function -- may result in an invalid 793 * 'delete_semaphore()' function -- may result in an invalid
@@ -821,8 +811,6 @@ acpi_status acpi_os_delete_semaphore(acpi_handle handle)
821 return AE_OK; 811 return AE_OK;
822} 812}
823 813
824EXPORT_SYMBOL(acpi_os_delete_semaphore);
825
826/* 814/*
827 * TODO: The kernel doesn't have a 'down_timeout' function -- had to 815 * TODO: The kernel doesn't have a 'down_timeout' function -- had to
828 * improvise. The process is to sleep for one scheduler quantum 816 * improvise. The process is to sleep for one scheduler quantum
@@ -915,8 +903,6 @@ acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout)
915 return status; 903 return status;
916} 904}
917 905
918EXPORT_SYMBOL(acpi_os_wait_semaphore);
919
920/* 906/*
921 * TODO: Support for units > 1? 907 * TODO: Support for units > 1?
922 */ 908 */
@@ -939,8 +925,6 @@ acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units)
939 return AE_OK; 925 return AE_OK;
940} 926}
941 927
942EXPORT_SYMBOL(acpi_os_signal_semaphore);
943
944#ifdef ACPI_FUTURE_USAGE 928#ifdef ACPI_FUTURE_USAGE
945u32 acpi_os_get_line(char *buffer) 929u32 acpi_os_get_line(char *buffer)
946{ 930{
@@ -984,8 +968,6 @@ acpi_status acpi_os_signal(u32 function, void *info)
984 return AE_OK; 968 return AE_OK;
985} 969}
986 970
987EXPORT_SYMBOL(acpi_os_signal);
988
989static int __init acpi_os_name_setup(char *str) 971static int __init acpi_os_name_setup(char *str)
990{ 972{
991 char *p = acpi_os_name; 973 char *p = acpi_os_name;
diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c
index 388300de005d..4b252ea0e952 100644
--- a/drivers/acpi/pci_bind.c
+++ b/drivers/acpi/pci_bind.c
@@ -44,6 +44,8 @@ struct acpi_pci_data {
44 struct pci_dev *dev; 44 struct pci_dev *dev;
45}; 45};
46 46
47static int acpi_pci_unbind(struct acpi_device *device);
48
47static void acpi_pci_data_handler(acpi_handle handle, u32 function, 49static void acpi_pci_data_handler(acpi_handle handle, u32 function,
48 void *context) 50 void *context)
49{ 51{
@@ -267,7 +269,7 @@ int acpi_pci_bind(struct acpi_device *device)
267 return result; 269 return result;
268} 270}
269 271
270int acpi_pci_unbind(struct acpi_device *device) 272static int acpi_pci_unbind(struct acpi_device *device)
271{ 273{
272 int result = 0; 274 int result = 0;
273 acpi_status status = AE_OK; 275 acpi_status status = AE_OK;
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 76d9c669d2d8..7f19859580c7 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -475,8 +475,6 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
475 return 0; 475 return 0;
476} 476}
477 477
478EXPORT_SYMBOL(acpi_pci_irq_enable);
479
480/* FIXME: implement x86/x86_64 version */ 478/* FIXME: implement x86/x86_64 version */
481void __attribute__ ((weak)) acpi_unregister_gsi(u32 i) 479void __attribute__ ((weak)) acpi_unregister_gsi(u32 i)
482{ 480{
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 5400ea173f6f..233c40c51684 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -95,7 +95,7 @@ static struct {
95 int count; 95 int count;
96 struct list_head entries; 96 struct list_head entries;
97} acpi_link; 97} acpi_link;
98DEFINE_MUTEX(acpi_link_lock); 98static DEFINE_MUTEX(acpi_link_lock);
99 99
100/* -------------------------------------------------------------------------- 100/* --------------------------------------------------------------------------
101 PCI Link Device Management 101 PCI Link Device Management
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index f136c7d3b3c2..1194105cc3ca 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -888,7 +888,7 @@ static void acpi_charger_remove(struct acpi_sbs *sbs)
888#endif 888#endif
889} 889}
890 890
891void acpi_sbs_callback(void *context) 891static void acpi_sbs_callback(void *context)
892{ 892{
893 int id; 893 int id;
894 struct acpi_sbs *sbs = context; 894 struct acpi_sbs *sbs = context;
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index fd40b6a1d639..ae9a90438e2f 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -111,8 +111,8 @@ static int wait_transaction_complete(struct acpi_smb_hc *hc, int timeout)
111 return -ETIME; 111 return -ETIME;
112} 112}
113 113
114int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol, u8 address, 114static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol,
115 u8 command, u8 *data, u8 length) 115 u8 address, u8 command, u8 *data, u8 length)
116{ 116{
117 int ret = -EFAULT, i; 117 int ret = -EFAULT, i;
118 u8 temp, sz = 0; 118 u8 temp, sz = 0;
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index c7b0aa52dd23..3fac011f9cf9 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -59,7 +59,7 @@ static int create_modalias(struct acpi_device *acpi_dev, char *modalias,
59 count = snprintf(&modalias[len], size, "%s:", 59 count = snprintf(&modalias[len], size, "%s:",
60 cid_list->id[i].value); 60 cid_list->id[i].value);
61 if (count < 0 || count >= size) { 61 if (count < 0 || count >= size) {
62 printk(KERN_ERR "acpi: %s cid[%i] exceeds event buffer size", 62 printk(KERN_ERR PREFIX "%s cid[%i] exceeds event buffer size",
63 acpi_dev->pnp.device_name, i); 63 acpi_dev->pnp.device_name, i);
64 break; 64 break;
65 } 65 }
@@ -453,7 +453,7 @@ static int acpi_device_register(struct acpi_device *device,
453 device->dev.release = &acpi_device_release; 453 device->dev.release = &acpi_device_release;
454 result = device_add(&device->dev); 454 result = device_add(&device->dev);
455 if(result) { 455 if(result) {
456 printk("Error adding device %s", device->dev.bus_id); 456 printk(KERN_ERR PREFIX "Error adding device %s", device->dev.bus_id);
457 goto end; 457 goto end;
458 } 458 }
459 459
@@ -966,7 +966,7 @@ static void acpi_device_set_id(struct acpi_device *device,
966 case ACPI_BUS_TYPE_DEVICE: 966 case ACPI_BUS_TYPE_DEVICE:
967 status = acpi_get_object_info(handle, &buffer); 967 status = acpi_get_object_info(handle, &buffer);
968 if (ACPI_FAILURE(status)) { 968 if (ACPI_FAILURE(status)) {
969 printk("%s: Error reading device info\n", __FUNCTION__); 969 printk(KERN_ERR PREFIX "%s: Error reading device info\n", __FUNCTION__);
970 return; 970 return;
971 } 971 }
972 972
@@ -1072,7 +1072,7 @@ static void acpi_device_set_id(struct acpi_device *device,
1072 list->count = count; 1072 list->count = count;
1073 device->pnp.cid_list = list; 1073 device->pnp.cid_list = list;
1074 } else 1074 } else
1075 printk(KERN_ERR "Memory allocation error\n"); 1075 printk(KERN_ERR PREFIX "Memory allocation error\n");
1076 } 1076 }
1077 1077
1078 kfree(buffer.pointer); 1078 kfree(buffer.pointer);
@@ -1096,7 +1096,7 @@ static int acpi_device_set_context(struct acpi_device *device, int type)
1096 acpi_bus_data_handler, device); 1096 acpi_bus_data_handler, device);
1097 1097
1098 if (ACPI_FAILURE(status)) { 1098 if (ACPI_FAILURE(status)) {
1099 printk("Error attaching device data\n"); 1099 printk(KERN_ERR PREFIX "Error attaching device data\n");
1100 result = -ENODEV; 1100 result = -ENODEV;
1101 } 1101 }
1102 } 1102 }