rpaphp_slot.c (c1f3ee120bb61045b1c0a3ead620d1d65af47130) rpaphp_slot.c (66bef8c059015ba2b36bb5759080336feb01e680)
1/*
2 * RPA Virtual I/O device functions
3 * Copyright (C) 2004 Linda Xie <lxie@us.ibm.com>
4 *
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 117 unchanged lines hidden (view full) ---

126}
127
128int rpaphp_deregister_slot(struct slot *slot)
129{
130 int retval = 0;
131 struct hotplug_slot *php_slot = slot->hotplug_slot;
132
133 dbg("%s - Entry: deregistering slot=%s\n",
1/*
2 * RPA Virtual I/O device functions
3 * Copyright (C) 2004 Linda Xie <lxie@us.ibm.com>
4 *
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 117 unchanged lines hidden (view full) ---

126}
127
128int rpaphp_deregister_slot(struct slot *slot)
129{
130 int retval = 0;
131 struct hotplug_slot *php_slot = slot->hotplug_slot;
132
133 dbg("%s - Entry: deregistering slot=%s\n",
134 __FUNCTION__, slot->name);
134 __func__, slot->name);
135
136 list_del(&slot->rpaphp_slot_list);
137
138 /* remove "address" file */
139 sysfs_remove_file(&php_slot->kobj, &php_attr_address.attr);
140
141 retval = pci_hp_deregister(php_slot);
142 if (retval)
143 err("Problem unregistering a slot %s\n", slot->name);
144
135
136 list_del(&slot->rpaphp_slot_list);
137
138 /* remove "address" file */
139 sysfs_remove_file(&php_slot->kobj, &php_attr_address.attr);
140
141 retval = pci_hp_deregister(php_slot);
142 if (retval)
143 err("Problem unregistering a slot %s\n", slot->name);
144
145 dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);
145 dbg("%s - Exit: rc[%d]\n", __func__, retval);
146 return retval;
147}
148EXPORT_SYMBOL_GPL(rpaphp_deregister_slot);
149
150int rpaphp_register_slot(struct slot *slot)
151{
152 struct hotplug_slot *php_slot = slot->hotplug_slot;
153 int retval;
154
155 dbg("%s registering slot:path[%s] index[%x], name[%s] pdomain[%x] type[%d]\n",
146 return retval;
147}
148EXPORT_SYMBOL_GPL(rpaphp_deregister_slot);
149
150int rpaphp_register_slot(struct slot *slot)
151{
152 struct hotplug_slot *php_slot = slot->hotplug_slot;
153 int retval;
154
155 dbg("%s registering slot:path[%s] index[%x], name[%s] pdomain[%x] type[%d]\n",
156 __FUNCTION__, slot->dn->full_name, slot->index, slot->name,
156 __func__, slot->dn->full_name, slot->index, slot->name,
157 slot->power_domain, slot->type);
158
159 /* should not try to register the same slot twice */
160 if (is_registered(slot)) {
161 err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name);
162 return -EAGAIN;
163 }
164

--- 23 unchanged lines hidden ---
157 slot->power_domain, slot->type);
158
159 /* should not try to register the same slot twice */
160 if (is_registered(slot)) {
161 err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name);
162 return -EAGAIN;
163 }
164

--- 23 unchanged lines hidden ---