Skip to contentSkip to conversation

ACPI: make code static

PATCH Applied [email protected] 2 participants 3 messages Dec 19, 2006 – Dec 20, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 18/19 ACPI: make code static

From: Adrian Bunk <[email protected]>

---

 drivers/acpi/bus.c          |    2 +-
 drivers/acpi/dock.c         |    4 ++--
 drivers/acpi/pci_bind.c     |    4 ++--
 include/acpi/acpi_bus.h     |    2 --
 include/acpi/acpi_drivers.h |    2 --
 5 files changed, 5 insertions(+), 9 deletions(-)
drivers/acpi/bus.c renamed from drivers/acpi/bus.c~acpi-make-code-static +1 -1
diff -puN drivers/acpi/bus.c~acpi-make-code-static drivers/acpi/bus.c
@@ -728,7 +728,7 @@ static int __init acpi_bus_init(void)
 	return -ENODEV;
 }
 
-decl_subsys(acpi, NULL, NULL);
+static decl_subsys(acpi, NULL, NULL);
 
 static int __init acpi_init(void)
 {
drivers/acpi/dock.c renamed from drivers/acpi/dock.c~acpi-make-code-static +2 -2
diff -puN drivers/acpi/dock.c~acpi-make-code-static drivers/acpi/dock.c
@@ -641,7 +641,7 @@ static ssize_t show_docked(struct device
 	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);
 
 /*
  * write_undock - write method for "undock" file in sysfs
@@ -657,7 +657,7 @@ static ssize_t write_undock(struct devic
 	ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST);
 	return ret ? ret: count;
 }
-DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock);
+static DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock);
 
 /**
  * dock_add - add a new dock station
drivers/acpi/pci_bind.c renamed from drivers/acpi/pci_bind.c~acpi-make-code-static +2 -2
diff -puN drivers/acpi/pci_bind.c~acpi-make-code-static drivers/acpi/pci_bind.c
@@ -106,7 +106,7 @@ acpi_status acpi_get_pci_id(acpi_handle 
 
 EXPORT_SYMBOL(acpi_get_pci_id);
 
-int acpi_pci_bind(struct acpi_device *device)
+static int acpi_pci_bind(struct acpi_device *device)
 {
 	int result = 0;
 	acpi_status status = AE_OK;
@@ -267,7 +267,7 @@ int acpi_pci_bind(struct acpi_device *de
 	return result;
 }
 
-int acpi_pci_unbind(struct acpi_device *device)
+static int acpi_pci_unbind(struct acpi_device *device)
 {
 	int result = 0;
 	acpi_status status = AE_OK;
include/acpi/acpi_bus.h renamed from include/acpi/acpi_bus.h~acpi-make-code-static +0 -2
diff -puN include/acpi/acpi_bus.h~acpi-make-code-static include/acpi/acpi_bus.h
@@ -315,8 +315,6 @@ struct acpi_bus_event {
 	u32 data;
 };
 
-extern struct subsystem acpi_subsys;
-
 /*
  * External Functions
  */
include/acpi/acpi_drivers.h renamed from include/acpi/acpi_drivers.h~acpi-make-code-static +0 -2
diff -puN include/acpi/acpi_drivers.h~acpi-make-code-static include/acpi/acpi_drivers.h
@@ -66,8 +66,6 @@ void acpi_pci_irq_del_prt(int segment, i
 struct pci_bus;
 
 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_unbind(struct acpi_device *device);
 int acpi_pci_bind_root(struct acpi_device *device, struct acpi_pci_id *id,
 		       struct pci_bus *bus);
 

_

reviewer Applied
#1 lore raw

Applied.

thanks,
-Len

Quoted 98 lines · On Tuesday 19 December 2006 15:56, [email protected] wrote:

From: Adrian Bunk <[email protected]>

---

 drivers/acpi/bus.c          |    2 +-
 drivers/acpi/dock.c         |    4 ++--
 drivers/acpi/pci_bind.c     |    4 ++--
 include/acpi/acpi_bus.h     |    2 --
 include/acpi/acpi_drivers.h |    2 --
 5 files changed, 5 insertions(+), 9 deletions(-)

diff -puN drivers/acpi/bus.c~acpi-make-code-static drivers/acpi/bus.c

drivers/acpi/bus.c renamed from drivers/acpi/bus.c~acpi-make-code-static +1 -1
@@ -728,7 +728,7 @@ static int __init acpi_bus_init(void)
 	return -ENODEV;
 }
 
-decl_subsys(acpi, NULL, NULL);
+static decl_subsys(acpi, NULL, NULL);
 
 static int __init acpi_init(void)
 {

diff -puN drivers/acpi/dock.c~acpi-make-code-static drivers/acpi/dock.c

drivers/acpi/dock.c renamed from drivers/acpi/dock.c~acpi-make-code-static +2 -2
@@ -641,7 +641,7 @@ static ssize_t show_docked(struct device
 	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);
 
 /*
  * write_undock - write method for "undock" file in sysfs
@@ -657,7 +657,7 @@ static ssize_t write_undock(struct devic
 	ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST);
 	return ret ? ret: count;
 }
-DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock);
+static DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock);
 
 /**
  * dock_add - add a new dock station

diff -puN drivers/acpi/pci_bind.c~acpi-make-code-static drivers/acpi/pci_bind.c

drivers/acpi/pci_bind.c renamed from drivers/acpi/pci_bind.c~acpi-make-code-static +2 -2
@@ -106,7 +106,7 @@ acpi_status acpi_get_pci_id(acpi_handle 
 
 EXPORT_SYMBOL(acpi_get_pci_id);
 
-int acpi_pci_bind(struct acpi_device *device)
+static int acpi_pci_bind(struct acpi_device *device)
 {
 	int result = 0;
 	acpi_status status = AE_OK;
@@ -267,7 +267,7 @@ int acpi_pci_bind(struct acpi_device *de
 	return result;
 }
 
-int acpi_pci_unbind(struct acpi_device *device)
+static int acpi_pci_unbind(struct acpi_device *device)
 {
 	int result = 0;
 	acpi_status status = AE_OK;

diff -puN include/acpi/acpi_bus.h~acpi-make-code-static include/acpi/acpi_bus.h

include/acpi/acpi_bus.h renamed from include/acpi/acpi_bus.h~acpi-make-code-static +0 -2
@@ -315,8 +315,6 @@ struct acpi_bus_event {
 	u32 data;
 };
 
-extern struct subsystem acpi_subsys;
-
 /*
  * External Functions
  */

diff -puN include/acpi/acpi_drivers.h~acpi-make-code-static include/acpi/acpi_drivers.h

include/acpi/acpi_drivers.h renamed from include/acpi/acpi_drivers.h~acpi-make-code-static +0 -2
@@ -66,8 +66,6 @@ void acpi_pci_irq_del_prt(int segment, i
 struct pci_bus;
 
 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_unbind(struct acpi_device *device);
 int acpi_pci_bind_root(struct acpi_device *device, struct acpi_pci_id *id,
 		       struct pci_bus *bus);
 

_
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

reviewer
#2 lore raw
Quoted 1 line · Len Brown

Applied.

Wups, had to NAK the acpi_pci_bind part...

drivers/acpi/pci_root.c: In function ‘acpi_pci_root_add’:
drivers/acpi/pci_root.c:181: error: ‘acpi_pci_bind’ undeclared (first use in this function) drivers/acpi/pci_root.c:181: error: (Each undeclared identifier is reported only once drivers/acpi/pci_root.c:181: error: for each function it appears in.)
make[2]: *** [drivers/acpi/pci_root.o] Error 1
make[2]: *** Waiting for unfinished jobs....
LD drivers/pnp/pnpacpi/built-in.o
LD drivers/pnp/built-in.o
drivers/acpi/pci_bind.c: In function ‘acpi_pci_bind’:
drivers/acpi/pci_bind.c:225: error: ‘acpi_pci_unbind’ undeclared (first use in this function) drivers/acpi/pci_bind.c:225: error: (Each undeclared identifier is reported only once drivers/acpi/pci_bind.c:225: error: for each function it appears in.)
make[2]: *** [drivers/acpi/pci_bind.o] Error 1

Leaving that below.

thanks,
-Len

commit 9e0ed41e9aff61648e2261ab334fb5eea3d5aeb3

Author: Adrian Bunk <[email protected]>
Date:   Tue Dec 19 12:56:24 2006 -0800

ACPI: make code static

drivers/acpi/bus.c +1 -1
index 279c4ba..555bf00 100644
@@ -728,7 +728,7 @@ static int __init acpi_bus_init(void)
 	return -ENODEV;
 }
 
-decl_subsys(acpi, NULL, NULL);
+static decl_subsys(acpi, NULL, NULL);
 
 static int __init acpi_init(void)
 {
drivers/acpi/dock.c +2 -2
index 90990a4..a66b4c7 100644
@@ -641,7 +641,7 @@ static ssize_t show_docked(struct device *dev,
 	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);
 
 /*
  * write_undock - write method for "undock" file in sysfs
@@ -657,7 +657,7 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr,
 	ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST);
 	return ret ? ret: count;
 }
-DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock);
+static DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock);
 
 /**
  * dock_add - add a new dock station
include/acpi/acpi_bus.h +0 -2
index fdd1095..cefe952 100644
@@ -315,8 +315,6 @@ struct acpi_bus_event {
 	u32 data;
 };
 
-extern struct subsystem acpi_subsys;
-
 /*
  * External Functions
  */

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html