summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/hotplug/ibmphp_core.c4
-rw-r--r--drivers/hotplug/ibmphp_ebda.c17
-rw-r--r--drivers/hotplug/ibmphp_hpc.c17
-rw-r--r--drivers/hotplug/ibmphp_res.c15
4 files changed, 28 insertions, 25 deletions
diff --git a/drivers/hotplug/ibmphp_core.c b/drivers/hotplug/ibmphp_core.c
index a377aef55f30..05e092126a3e 100644
--- a/drivers/hotplug/ibmphp_core.c
+++ b/drivers/hotplug/ibmphp_core.c
@@ -106,7 +106,7 @@ static inline int slot_update (struct slot **sl)
return rc;
}
-static int get_max_slots (void)
+static int __init get_max_slots (void)
{
struct list_head * tmp;
int slot_count = 0;
@@ -528,7 +528,7 @@ static int get_card_bus_names (struct hotplug_slot *hotplug_slot, char * value)
* function. It will also power off empty slots that are powered on since BIOS
* leaves those on, albeit disconnected
******************************************************************************/
-static int init_ops (void)
+static int __init init_ops (void)
{
struct slot *slot_cur;
int retval;
diff --git a/drivers/hotplug/ibmphp_ebda.c b/drivers/hotplug/ibmphp_ebda.c
index 7b3f0ed9e94c..de180f16e01a 100644
--- a/drivers/hotplug/ibmphp_ebda.c
+++ b/drivers/hotplug/ibmphp_ebda.c
@@ -34,6 +34,7 @@
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/list.h>
+#include <linux/init.h>
#include "ibmphp.h"
/*
@@ -76,7 +77,7 @@ static struct slot *alloc_ibm_slot (void)
return slot;
}
-static struct ebda_hpc_list *alloc_ebda_hpc_list (void)
+static struct ebda_hpc_list * __init alloc_ebda_hpc_list (void)
{
struct ebda_hpc_list *list;
@@ -127,7 +128,7 @@ static void free_ebda_hpc (struct controller *controller)
kfree (controller);
}
-static struct ebda_rsrc_list *alloc_ebda_rsrc_list (void)
+static struct ebda_rsrc_list * __init alloc_ebda_rsrc_list (void)
{
struct ebda_rsrc_list *list;
@@ -149,7 +150,7 @@ static struct ebda_pci_rsrc *alloc_ebda_pci_rsrc (void)
return resource;
}
-static void print_bus_info (void)
+static void __init print_bus_info (void)
{
struct bus_info *ptr;
struct list_head *ptr1;
@@ -184,7 +185,7 @@ static void print_ebda_pci_rsrc (void)
}
}
-static void print_ebda_hpc (void)
+static void __init print_ebda_hpc (void)
{
struct controller *hpc_ptr;
struct list_head *ptr1;
@@ -228,7 +229,7 @@ static void print_ebda_hpc (void)
}
}
-int ibmphp_access_ebda (void)
+int __init ibmphp_access_ebda (void)
{
u8 format, num_ctlrs, rio_complete, hs_complete;
u16 ebda_seg, num_entries, next_offset, offset, blk_id, sub_addr, rc, re, rc_id, re_id, base;
@@ -387,7 +388,7 @@ int ibmphp_access_ebda (void)
* each hpc from physical address to a list of hot plug controllers based on
* hpc descriptors.
*/
-static int ebda_rsrc_controller (void)
+static int __init ebda_rsrc_controller (void)
{
u16 addr, addr_slot, addr_bus;
u8 ctlr_id, temp, bus_index;
@@ -649,7 +650,7 @@ static int ebda_rsrc_controller (void)
* map info (bus, devfun, start addr, end addr..) of i/o, memory,
* pfm from the physical addr to a list of resource.
*/
-static int ebda_rsrc_rsrc (void)
+static int __init ebda_rsrc_rsrc (void)
{
u16 addr;
short rsrc;
@@ -717,7 +718,7 @@ static int ebda_rsrc_rsrc (void)
/*
* map info of scalability details and rio details from physical address
*/
-static int ebda_rio_table(void)
+static int __init ebda_rio_table(void)
{
u16 offset;
u8 i;
diff --git a/drivers/hotplug/ibmphp_hpc.c b/drivers/hotplug/ibmphp_hpc.c
index b3150aea49ff..deb03286c737 100644
--- a/drivers/hotplug/ibmphp_hpc.c
+++ b/drivers/hotplug/ibmphp_hpc.c
@@ -32,6 +32,7 @@
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/smp_lock.h>
+#include <linux/init.h>
#include "ibmphp.h"
static int to_debug = FALSE;
@@ -126,7 +127,7 @@ static int hpc_wait_ctlr_notworking (int, struct controller *, void *, u8 *);
*
* Action: initialize semaphores and variables
*---------------------------------------------------------------------*/
-void ibmphp_hpc_initvars (void)
+void __init ibmphp_hpc_initvars (void)
{
debug ("%s - Entry\n", __FUNCTION__);
@@ -1044,19 +1045,19 @@ static int hpc_poll_thread (void *data)
*
* Action: start polling thread
*---------------------------------------------------------------------*/
-int ibmphp_hpc_start_poll_thread (void)
+int __init ibmphp_hpc_start_poll_thread (void)
{
int rc = 0;
- debug ("ibmphp_hpc_start_poll_thread - Entry\n");
+ debug ("%s - Entry\n", __FUNCTION__);
tid_poll = kernel_thread (hpc_poll_thread, 0, 0);
if (tid_poll < 0) {
- err ("ibmphp_hpc_start_poll_thread - Error, thread not started\n");
+ err ("%s - Error, thread not started\n", __FUNCTION__);
rc = -1;
}
- debug ("ibmphp_hpc_start_poll_thread - Exit tid_poll[%d] rc[%d]\n", tid_poll, rc);
+ debug ("%s - Exit tid_poll[%d] rc[%d]\n", __FUNCTION__, tid_poll, rc);
return rc;
}
@@ -1065,9 +1066,9 @@ int ibmphp_hpc_start_poll_thread (void)
*
* Action: stop polling thread and cleanup
*---------------------------------------------------------------------*/
-void ibmphp_hpc_stop_poll_thread (void)
+void __exit ibmphp_hpc_stop_poll_thread (void)
{
- debug ("ibmphp_hpc_stop_poll_thread - Entry\n");
+ debug ("%s - Entry\n", __FUNCTION__);
ibmphp_shutdown = TRUE;
ibmphp_lock_operations ();
@@ -1080,7 +1081,7 @@ void ibmphp_hpc_stop_poll_thread (void)
ibmphp_unlock_operations ();
up (&sem_exit);
- debug ("ibmphp_hpc_stop_poll_thread - Exit\n");
+ debug ("%s - Exit\n", __FUNCTION__);
}
/*----------------------------------------------------------------------
diff --git a/drivers/hotplug/ibmphp_res.c b/drivers/hotplug/ibmphp_res.c
index cfd4ad4365eb..0cf06e48e078 100644
--- a/drivers/hotplug/ibmphp_res.c
+++ b/drivers/hotplug/ibmphp_res.c
@@ -31,6 +31,7 @@
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/list.h>
+#include <linux/init.h>
#include "ibmphp.h"
static int flags = 0; /* for testing */
@@ -45,7 +46,7 @@ static inline struct bus_node *find_bus_wprev (u8, struct bus_node **, u8);
static LIST_HEAD(gbuses);
-static struct bus_node * alloc_error_bus (struct ebda_pci_rsrc * curr)
+static struct bus_node * __init alloc_error_bus (struct ebda_pci_rsrc * curr)
{
struct bus_node * newbus;
@@ -61,7 +62,7 @@ static struct bus_node * alloc_error_bus (struct ebda_pci_rsrc * curr)
return newbus;
}
-static struct resource_node * alloc_resources (struct ebda_pci_rsrc * curr)
+static struct resource_node * __init alloc_resources (struct ebda_pci_rsrc * curr)
{
struct resource_node *rs = kmalloc (sizeof (struct resource_node), GFP_KERNEL);
if (!rs) {
@@ -77,7 +78,7 @@ static struct resource_node * alloc_resources (struct ebda_pci_rsrc * curr)
return rs;
}
-static int alloc_bus_range (struct bus_node **new_bus, struct range_node **new_range, struct ebda_pci_rsrc *curr, int flag, u8 first_bus)
+static int __init alloc_bus_range (struct bus_node **new_bus, struct range_node **new_range, struct ebda_pci_rsrc *curr, int flag, u8 first_bus)
{
struct bus_node * newbus;
struct range_node *newrange;
@@ -184,7 +185,7 @@ static int alloc_bus_range (struct bus_node **new_bus, struct range_node **new_r
* Input: ptr to the head of the resource list from EBDA
* Output: 0, -1 or error codes
***************************************************************************/
-int ibmphp_rsrc_init (void)
+int __init ibmphp_rsrc_init (void)
{
struct ebda_pci_rsrc *curr;
struct range_node *newrange = NULL;
@@ -1650,7 +1651,7 @@ void ibmphp_free_resources (void)
* a new Mem node
* This routine is called right after initialization
*******************************************************************************/
-static int once_over (void)
+static int __init once_over (void)
{
struct resource_node *pfmem_cur;
struct resource_node *pfmem_prev;
@@ -1871,7 +1872,7 @@ void ibmphp_print_test (void)
* behind them All these are TO DO.
* Also need to add more error checkings... (from fnc returns etc)
*/
-static int update_bridge_ranges (struct bus_node **bus)
+static int __init update_bridge_ranges (struct bus_node **bus)
{
u8 sec_busno, device, function, busno, hdr_type, start_io_address, end_io_address;
u16 vendor_id, upper_io_start, upper_io_end, start_mem_address, end_mem_address;
@@ -1885,7 +1886,7 @@ static int update_bridge_ranges (struct bus_node **bus)
bus_cur = *bus;
busno = bus_cur->busno;
- debug ("inside update_bridge_ranges \n");
+ debug ("inside %s \n", __FUNCTION__);
debug ("bus_cur->busno = %x\n", bus_cur->busno);
for (device = 0; device < 32; device++) {