aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2007-11-09 03:29:42 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 18:04:24 -0500
commit941f10e941ec31beeec4af3ad38644da581010c4 (patch)
treeaee6e50ad13bffacfd6a71488465eb4321d92df3 /drivers/pci
parent0837974ddbdef14d268b3ffe032158f6490cbe64 (diff)
PCI Hotplug: pciehp: remove needless hp_slot calculation
Remove needless hp_slot calculation. This has no functional changes. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/pciehp_ctrl.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index e5eb9106e7be..4cb2c623e17b 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -213,15 +213,12 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
213 */ 213 */
214static int board_added(struct slot *p_slot) 214static int board_added(struct slot *p_slot)
215{ 215{
216 u8 hp_slot;
217 int retval = 0; 216 int retval = 0;
218 struct controller *ctrl = p_slot->ctrl; 217 struct controller *ctrl = p_slot->ctrl;
219 218
220 hp_slot = p_slot->device - ctrl->slot_device_offset;
221
222 dbg("%s: slot device, slot offset, hp slot = %d, %d ,%d\n", 219 dbg("%s: slot device, slot offset, hp slot = %d, %d ,%d\n",
223 __FUNCTION__, p_slot->device, 220 __FUNCTION__, p_slot->device,
224 ctrl->slot_device_offset, hp_slot); 221 ctrl->slot_device_offset, p_slot->hp_slot);
225 222
226 if (POWER_CTRL(ctrl->ctrlcap)) { 223 if (POWER_CTRL(ctrl->ctrlcap)) {
227 /* Power on slot */ 224 /* Power on slot */
@@ -279,8 +276,6 @@ err_exit:
279 */ 276 */
280static int remove_board(struct slot *p_slot) 277static int remove_board(struct slot *p_slot)
281{ 278{
282 u8 device;
283 u8 hp_slot;
284 int retval = 0; 279 int retval = 0;
285 struct controller *ctrl = p_slot->ctrl; 280 struct controller *ctrl = p_slot->ctrl;
286 281
@@ -288,11 +283,7 @@ static int remove_board(struct slot *p_slot)
288 if (retval) 283 if (retval)
289 return retval; 284 return retval;
290 285
291 device = p_slot->device; 286 dbg("In %s, hp_slot = %d\n", __FUNCTION__, p_slot->hp_slot);
292 hp_slot = p_slot->device - ctrl->slot_device_offset;
293 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
294
295 dbg("In %s, hp_slot = %d\n", __FUNCTION__, hp_slot);
296 287
297 if (POWER_CTRL(ctrl->ctrlcap)) { 288 if (POWER_CTRL(ctrl->ctrlcap)) {
298 /* power off slot */ 289 /* power off slot */