aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/rpaphp_slot.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/rpaphp_slot.c')
-rw-r--r--drivers/pci/hotplug/rpaphp_slot.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c
index daa89ae57123..78943e064b59 100644
--- a/drivers/pci/hotplug/rpaphp_slot.c
+++ b/drivers/pci/hotplug/rpaphp_slot.c
@@ -35,16 +35,16 @@
35 35
36static ssize_t location_read_file (struct hotplug_slot *php_slot, char *buf) 36static ssize_t location_read_file (struct hotplug_slot *php_slot, char *buf)
37{ 37{
38 char *value; 38 char *value;
39 int retval = -ENOENT; 39 int retval = -ENOENT;
40 struct slot *slot = (struct slot *)php_slot->private; 40 struct slot *slot = (struct slot *)php_slot->private;
41 41
42 if (!slot) 42 if (!slot)
43 return retval; 43 return retval;
44 44
45 value = slot->location; 45 value = slot->location;
46 retval = sprintf (buf, "%s\n", value); 46 retval = sprintf (buf, "%s\n", value);
47 return retval; 47 return retval;
48} 48}
49 49
50static struct hotplug_slot_attribute hotplug_slot_attr_location = { 50static struct hotplug_slot_attribute hotplug_slot_attr_location = {
@@ -137,7 +137,7 @@ static int is_registered(struct slot *slot)
137 return 0; 137 return 0;
138} 138}
139 139
140int deregister_slot(struct slot *slot) 140int rpaphp_deregister_slot(struct slot *slot)
141{ 141{
142 int retval = 0; 142 int retval = 0;
143 struct hotplug_slot *php_slot = slot->hotplug_slot; 143 struct hotplug_slot *php_slot = slot->hotplug_slot;
@@ -159,8 +159,9 @@ int deregister_slot(struct slot *slot)
159 dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval); 159 dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);
160 return retval; 160 return retval;
161} 161}
162EXPORT_SYMBOL_GPL(rpaphp_deregister_slot);
162 163
163int register_slot(struct slot *slot) 164int rpaphp_register_slot(struct slot *slot)
164{ 165{
165 int retval; 166 int retval;
166 167
@@ -169,7 +170,7 @@ int register_slot(struct slot *slot)
169 slot->power_domain, slot->type); 170 slot->power_domain, slot->type);
170 /* should not try to register the same slot twice */ 171 /* should not try to register the same slot twice */
171 if (is_registered(slot)) { /* should't be here */ 172 if (is_registered(slot)) { /* should't be here */
172 err("register_slot: slot[%s] is already registered\n", slot->name); 173 err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name);
173 rpaphp_release_slot(slot->hotplug_slot); 174 rpaphp_release_slot(slot->hotplug_slot);
174 return -EAGAIN; 175 return -EAGAIN;
175 } 176 }