提交 e5685b9d 编写于 作者: A Adrian Bunk 提交者: Len Brown

ACPI: misc cleanups

    This patch contains the following possible cleanups:
    - make the following needlessly global code static:
      - drivers/acpi/bay.c:dev_attr_eject
      - drivers/acpi/bay.c:dev_attr_present
      - drivers/acpi/dock.c:dev_attr_docked
      - drivers/acpi/dock.c:dev_attr_flags
      - drivers/acpi/dock.c:dev_attr_uid
      - drivers/acpi/dock.c:dev_attr_undock
      - drivers/acpi/pci_bind.c:acpi_pci_unbind()
      - drivers/acpi/pci_link.c:acpi_link_lock
      - drivers/acpi/sbs.c:acpi_sbs_callback()
      - drivers/acpi/sbshc.c:acpi_smbus_transaction()
      - drivers/acpi/sleep/main.c:acpi_sleep_prepare()
    - #if 0 the following unused global functions:
      - drivers/acpi/numa.c:acpi_unmap_pxm_to_node()
    - remove the following unused EXPORT_SYMBOL's:
      - acpi_register_gsi
      - acpi_unregister_gsi
      - acpi_strict
      - acpi_bus_receive_event
      - register_acpi_bus_type
      - unregister_acpi_bus_type
      - acpi_os_printf
      - acpi_os_sleep
      - acpi_os_stall
      - acpi_os_read_pci_configuration
      - acpi_os_create_semaphore
      - acpi_os_delete_semaphore
      - acpi_os_wait_semaphore
      - acpi_os_signal_semaphore
      - acpi_os_signal
      - acpi_pci_irq_enable
      - acpi_get_pxm
Signed-off-by: NAdrian Bunk <bunk@kernel.org>
Acked-by: NAlexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 87ecd5cd
...@@ -601,8 +601,6 @@ int acpi_register_gsi(u32 gsi, int triggering, int polarity) ...@@ -601,8 +601,6 @@ int acpi_register_gsi(u32 gsi, int triggering, int polarity)
IOSAPIC_LEVEL); IOSAPIC_LEVEL);
} }
EXPORT_SYMBOL(acpi_register_gsi);
void acpi_unregister_gsi(u32 gsi) void acpi_unregister_gsi(u32 gsi)
{ {
if (acpi_irq_model == ACPI_IRQ_MODEL_PLATFORM) if (acpi_irq_model == ACPI_IRQ_MODEL_PLATFORM)
...@@ -611,8 +609,6 @@ void acpi_unregister_gsi(u32 gsi) ...@@ -611,8 +609,6 @@ void acpi_unregister_gsi(u32 gsi)
iosapic_unregister_intr(gsi); iosapic_unregister_intr(gsi);
} }
EXPORT_SYMBOL(acpi_unregister_gsi);
static int __init acpi_parse_fadt(struct acpi_table_header *table) static int __init acpi_parse_fadt(struct acpi_table_header *table)
{ {
struct acpi_table_header *fadt_header; struct acpi_table_header *fadt_header;
......
...@@ -78,7 +78,6 @@ int acpi_ht __initdata = 1; /* enable HT */ ...@@ -78,7 +78,6 @@ int acpi_ht __initdata = 1; /* enable HT */
int acpi_lapic; int acpi_lapic;
int acpi_ioapic; int acpi_ioapic;
int acpi_strict; int acpi_strict;
EXPORT_SYMBOL(acpi_strict);
u8 acpi_sci_flags __initdata; u8 acpi_sci_flags __initdata;
int acpi_sci_override_gsi __initdata; int acpi_sci_override_gsi __initdata;
...@@ -490,8 +489,6 @@ int acpi_register_gsi(u32 gsi, int triggering, int polarity) ...@@ -490,8 +489,6 @@ int acpi_register_gsi(u32 gsi, int triggering, int polarity)
return irq; return irq;
} }
EXPORT_SYMBOL(acpi_register_gsi);
/* /*
* ACPI based hotplug support for CPU * ACPI based hotplug support for CPU
*/ */
......
...@@ -128,7 +128,7 @@ static ssize_t show_present(struct device *dev, ...@@ -128,7 +128,7 @@ static ssize_t show_present(struct device *dev,
return snprintf(buf, PAGE_SIZE, "%d\n", bay_present(bay)); return snprintf(buf, PAGE_SIZE, "%d\n", bay_present(bay));
} }
DEVICE_ATTR(present, S_IRUGO, show_present, NULL); static DEVICE_ATTR(present, S_IRUGO, show_present, NULL);
/* /*
* write_eject - write method for "eject" file in sysfs * write_eject - write method for "eject" file in sysfs
...@@ -144,7 +144,7 @@ static ssize_t write_eject(struct device *dev, struct device_attribute *attr, ...@@ -144,7 +144,7 @@ static ssize_t write_eject(struct device *dev, struct device_attribute *attr,
eject_device(bay->handle); eject_device(bay->handle);
return count; return count;
} }
DEVICE_ATTR(eject, S_IWUSR, NULL, write_eject); static DEVICE_ATTR(eject, S_IWUSR, NULL, write_eject);
/** /**
* is_ata - see if a device is an ata device * is_ata - see if a device is an ata device
......
...@@ -366,7 +366,6 @@ int acpi_bus_receive_event(struct acpi_bus_event *event) ...@@ -366,7 +366,6 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
return 0; return 0;
} }
EXPORT_SYMBOL(acpi_bus_receive_event);
#endif /* CONFIG_ACPI_PROC_EVENT */ #endif /* CONFIG_ACPI_PROC_EVENT */
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
......
...@@ -680,7 +680,7 @@ static ssize_t show_docked(struct device *dev, ...@@ -680,7 +680,7 @@ static ssize_t show_docked(struct device *dev,
return snprintf(buf, PAGE_SIZE, "%d\n", dock_present(dock_station)); return snprintf(buf, PAGE_SIZE, "%d\n", dock_present(dock_station));
} }
DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL);
/* /*
* show_flags - read method for flags file in sysfs * show_flags - read method for flags file in sysfs
...@@ -691,7 +691,7 @@ static ssize_t show_flags(struct device *dev, ...@@ -691,7 +691,7 @@ static ssize_t show_flags(struct device *dev,
return snprintf(buf, PAGE_SIZE, "%d\n", dock_station->flags); return snprintf(buf, PAGE_SIZE, "%d\n", dock_station->flags);
} }
DEVICE_ATTR(flags, S_IRUGO, show_flags, NULL); static DEVICE_ATTR(flags, S_IRUGO, show_flags, NULL);
/* /*
* write_undock - write method for "undock" file in sysfs * write_undock - write method for "undock" file in sysfs
...@@ -707,7 +707,7 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr, ...@@ -707,7 +707,7 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr,
ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST); ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST);
return ret ? ret: count; return ret ? ret: count;
} }
DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock); static DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock);
/* /*
* show_dock_uid - read method for "uid" file in sysfs * show_dock_uid - read method for "uid" file in sysfs
...@@ -723,7 +723,7 @@ static ssize_t show_dock_uid(struct device *dev, ...@@ -723,7 +723,7 @@ static ssize_t show_dock_uid(struct device *dev,
return snprintf(buf, PAGE_SIZE, "%lx\n", lbuf); return snprintf(buf, PAGE_SIZE, "%lx\n", lbuf);
} }
DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL); static DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL);
/** /**
* dock_add - add a new dock station * dock_add - add a new dock station
......
...@@ -36,8 +36,6 @@ int register_acpi_bus_type(struct acpi_bus_type *type) ...@@ -36,8 +36,6 @@ int register_acpi_bus_type(struct acpi_bus_type *type)
return -ENODEV; return -ENODEV;
} }
EXPORT_SYMBOL(register_acpi_bus_type);
int unregister_acpi_bus_type(struct acpi_bus_type *type) int unregister_acpi_bus_type(struct acpi_bus_type *type)
{ {
if (acpi_disabled) if (acpi_disabled)
...@@ -53,8 +51,6 @@ int unregister_acpi_bus_type(struct acpi_bus_type *type) ...@@ -53,8 +51,6 @@ int unregister_acpi_bus_type(struct acpi_bus_type *type)
return -ENODEV; return -ENODEV;
} }
EXPORT_SYMBOL(unregister_acpi_bus_type);
static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type) static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type)
{ {
struct acpi_bus_type *tmp, *ret = NULL; struct acpi_bus_type *tmp, *ret = NULL;
......
...@@ -78,6 +78,7 @@ int acpi_map_pxm_to_node(int pxm) ...@@ -78,6 +78,7 @@ int acpi_map_pxm_to_node(int pxm)
return node; return node;
} }
#if 0
void __cpuinit acpi_unmap_pxm_to_node(int node) void __cpuinit acpi_unmap_pxm_to_node(int node)
{ {
int pxm = node_to_pxm_map[node]; int pxm = node_to_pxm_map[node];
...@@ -85,6 +86,7 @@ void __cpuinit acpi_unmap_pxm_to_node(int node) ...@@ -85,6 +86,7 @@ void __cpuinit acpi_unmap_pxm_to_node(int node)
node_to_pxm_map[node] = PXM_INVAL; node_to_pxm_map[node] = PXM_INVAL;
node_clear(node, nodes_found_map); node_clear(node, nodes_found_map);
} }
#endif /* 0 */
static void __init static void __init
acpi_table_print_srat_entry(struct acpi_subtable_header *header) acpi_table_print_srat_entry(struct acpi_subtable_header *header)
...@@ -247,7 +249,6 @@ int acpi_get_pxm(acpi_handle h) ...@@ -247,7 +249,6 @@ int acpi_get_pxm(acpi_handle h)
} while (ACPI_SUCCESS(status)); } while (ACPI_SUCCESS(status));
return -1; return -1;
} }
EXPORT_SYMBOL(acpi_get_pxm);
int acpi_get_node(acpi_handle *handle) int acpi_get_node(acpi_handle *handle)
{ {
......
...@@ -219,8 +219,6 @@ void acpi_os_printf(const char *fmt, ...) ...@@ -219,8 +219,6 @@ void acpi_os_printf(const char *fmt, ...)
va_end(args); va_end(args);
} }
EXPORT_SYMBOL(acpi_os_printf);
void acpi_os_vprintf(const char *fmt, va_list args) void acpi_os_vprintf(const char *fmt, va_list args)
{ {
static char buffer[512]; static char buffer[512];
...@@ -384,8 +382,6 @@ void acpi_os_sleep(acpi_integer ms) ...@@ -384,8 +382,6 @@ void acpi_os_sleep(acpi_integer ms)
schedule_timeout_interruptible(msecs_to_jiffies(ms)); schedule_timeout_interruptible(msecs_to_jiffies(ms));
} }
EXPORT_SYMBOL(acpi_os_sleep);
void acpi_os_stall(u32 us) void acpi_os_stall(u32 us)
{ {
while (us) { while (us) {
...@@ -399,8 +395,6 @@ void acpi_os_stall(u32 us) ...@@ -399,8 +395,6 @@ void acpi_os_stall(u32 us)
} }
} }
EXPORT_SYMBOL(acpi_os_stall);
/* /*
* Support ACPI 3.0 AML Timer operand * Support ACPI 3.0 AML Timer operand
* Returns 64-bit free-running, monotonically increasing timer * Returns 64-bit free-running, monotonically increasing timer
...@@ -550,8 +544,6 @@ acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg, ...@@ -550,8 +544,6 @@ acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
return (result ? AE_ERROR : AE_OK); return (result ? AE_ERROR : AE_OK);
} }
EXPORT_SYMBOL(acpi_os_read_pci_configuration);
acpi_status acpi_status
acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg, acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
acpi_integer value, u32 width) acpi_integer value, u32 width)
...@@ -793,8 +785,6 @@ acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle) ...@@ -793,8 +785,6 @@ acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle)
return AE_OK; return AE_OK;
} }
EXPORT_SYMBOL(acpi_os_create_semaphore);
/* /*
* TODO: A better way to delete semaphores? Linux doesn't have a * TODO: A better way to delete semaphores? Linux doesn't have a
* 'delete_semaphore()' function -- may result in an invalid * 'delete_semaphore()' function -- may result in an invalid
...@@ -818,8 +808,6 @@ acpi_status acpi_os_delete_semaphore(acpi_handle handle) ...@@ -818,8 +808,6 @@ acpi_status acpi_os_delete_semaphore(acpi_handle handle)
return AE_OK; return AE_OK;
} }
EXPORT_SYMBOL(acpi_os_delete_semaphore);
/* /*
* TODO: The kernel doesn't have a 'down_timeout' function -- had to * TODO: The kernel doesn't have a 'down_timeout' function -- had to
* improvise. The process is to sleep for one scheduler quantum * improvise. The process is to sleep for one scheduler quantum
...@@ -912,8 +900,6 @@ acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout) ...@@ -912,8 +900,6 @@ acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout)
return status; return status;
} }
EXPORT_SYMBOL(acpi_os_wait_semaphore);
/* /*
* TODO: Support for units > 1? * TODO: Support for units > 1?
*/ */
...@@ -936,8 +922,6 @@ acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units) ...@@ -936,8 +922,6 @@ acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units)
return AE_OK; return AE_OK;
} }
EXPORT_SYMBOL(acpi_os_signal_semaphore);
#ifdef ACPI_FUTURE_USAGE #ifdef ACPI_FUTURE_USAGE
u32 acpi_os_get_line(char *buffer) u32 acpi_os_get_line(char *buffer)
{ {
...@@ -981,8 +965,6 @@ acpi_status acpi_os_signal(u32 function, void *info) ...@@ -981,8 +965,6 @@ acpi_status acpi_os_signal(u32 function, void *info)
return AE_OK; return AE_OK;
} }
EXPORT_SYMBOL(acpi_os_signal);
static int __init acpi_os_name_setup(char *str) static int __init acpi_os_name_setup(char *str)
{ {
char *p = acpi_os_name; char *p = acpi_os_name;
......
...@@ -44,6 +44,8 @@ struct acpi_pci_data { ...@@ -44,6 +44,8 @@ struct acpi_pci_data {
struct pci_dev *dev; struct pci_dev *dev;
}; };
static int acpi_pci_unbind(struct acpi_device *device);
static void acpi_pci_data_handler(acpi_handle handle, u32 function, static void acpi_pci_data_handler(acpi_handle handle, u32 function,
void *context) void *context)
{ {
...@@ -267,7 +269,7 @@ int acpi_pci_bind(struct acpi_device *device) ...@@ -267,7 +269,7 @@ int acpi_pci_bind(struct acpi_device *device)
return result; return result;
} }
int acpi_pci_unbind(struct acpi_device *device) static int acpi_pci_unbind(struct acpi_device *device)
{ {
int result = 0; int result = 0;
acpi_status status = AE_OK; acpi_status status = AE_OK;
......
...@@ -478,8 +478,6 @@ int acpi_pci_irq_enable(struct pci_dev *dev) ...@@ -478,8 +478,6 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
return 0; return 0;
} }
EXPORT_SYMBOL(acpi_pci_irq_enable);
/* FIXME: implement x86/x86_64 version */ /* FIXME: implement x86/x86_64 version */
void __attribute__ ((weak)) acpi_unregister_gsi(u32 i) void __attribute__ ((weak)) acpi_unregister_gsi(u32 i)
{ {
......
...@@ -95,7 +95,7 @@ static struct { ...@@ -95,7 +95,7 @@ static struct {
int count; int count;
struct list_head entries; struct list_head entries;
} acpi_link; } acpi_link;
DEFINE_MUTEX(acpi_link_lock); static DEFINE_MUTEX(acpi_link_lock);
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
PCI Link Device Management PCI Link Device Management
......
...@@ -888,7 +888,7 @@ static void acpi_charger_remove(struct acpi_sbs *sbs) ...@@ -888,7 +888,7 @@ static void acpi_charger_remove(struct acpi_sbs *sbs)
#endif #endif
} }
void acpi_sbs_callback(void *context) static void acpi_sbs_callback(void *context)
{ {
int id; int id;
struct acpi_sbs *sbs = context; struct acpi_sbs *sbs = context;
......
...@@ -111,8 +111,8 @@ static int wait_transaction_complete(struct acpi_smb_hc *hc, int timeout) ...@@ -111,8 +111,8 @@ static int wait_transaction_complete(struct acpi_smb_hc *hc, int timeout)
return -ETIME; return -ETIME;
} }
int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol, u8 address, static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol,
u8 command, u8 *data, u8 length) u8 address, u8 command, u8 *data, u8 length)
{ {
int ret = -EFAULT, i; int ret = -EFAULT, i;
u8 temp, sz = 0; u8 temp, sz = 0;
......
...@@ -73,7 +73,6 @@ struct pci_bus; ...@@ -73,7 +73,6 @@ struct pci_bus;
acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id); acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id);
int acpi_pci_bind(struct acpi_device *device); int acpi_pci_bind(struct acpi_device *device);
int acpi_pci_unbind(struct acpi_device *device);
int acpi_pci_bind_root(struct acpi_device *device, struct acpi_pci_id *id, int acpi_pci_bind_root(struct acpi_device *device, struct acpi_pci_id *id,
struct pci_bus *bus); struct pci_bus *bus);
......
...@@ -15,7 +15,6 @@ extern int pxm_to_node(int); ...@@ -15,7 +15,6 @@ extern int pxm_to_node(int);
extern int node_to_pxm(int); extern int node_to_pxm(int);
extern void __acpi_map_pxm_to_node(int, int); extern void __acpi_map_pxm_to_node(int, int);
extern int acpi_map_pxm_to_node(int); extern int acpi_map_pxm_to_node(int);
extern void __cpuinit acpi_unmap_pxm_to_node(int);
#endif /* CONFIG_ACPI_NUMA */ #endif /* CONFIG_ACPI_NUMA */
#endif /* __ACP_NUMA_H */ #endif /* __ACP_NUMA_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册