From 4abf6df12b4a15a45b212c3cbfa410e612f8a8d0 Mon Sep 17 00:00:00 2001 From: Kenji Kaneshige Date: Sat, 16 Dec 2006 15:25:49 -0800 Subject: [PATCH] --- yaml --- r: 44822 b: refs/heads/master c: 6f39be2e05cc6e66481f1395264297f06bef1e21 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/pci/hotplug/shpchp_core.c | 25 +------------------------ 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/[refs] b/[refs] index 85b5aa1c0266..ad6361c5d586 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 227b84c77f5fb3a3b01e5dee1a2928cafc5fd216 +refs/heads/master: 6f39be2e05cc6e66481f1395264297f06bef1e21 diff --git a/trunk/drivers/pci/hotplug/shpchp_core.c b/trunk/drivers/pci/hotplug/shpchp_core.c index b64999d59f57..24d1afa4cf97 100644 --- a/trunk/drivers/pci/hotplug/shpchp_core.c +++ b/trunk/drivers/pci/hotplug/shpchp_core.c @@ -104,23 +104,6 @@ static void make_slot_name(struct slot *slot) slot->bus, slot->number); } - - - -static int -shpchprm_get_physical_slot_number(struct controller *ctrl, u32 *sun, - u8 busnum, u8 devnum) -{ - int offset = devnum - ctrl->slot_device_offset; - - dbg("%s: ctrl->slot_num_inc %d, offset %d\n", __FUNCTION__, - ctrl->slot_num_inc, offset); - *sun = (u8) (ctrl->first_slot + ctrl->slot_num_inc *offset); - return 0; -} - - - static int init_slots(struct controller *ctrl) { struct slot *slot; @@ -128,7 +111,6 @@ static int init_slots(struct controller *ctrl) struct hotplug_slot_info *info; int retval = -ENOMEM; int i; - u32 sun; for (i = 0; i < ctrl->num_slots; i++) { slot = kzalloc(sizeof(*slot), GFP_KERNEL); @@ -152,13 +134,8 @@ static int init_slots(struct controller *ctrl) slot->bus = ctrl->pci_dev->subordinate->number; slot->device = ctrl->slot_device_offset + i; slot->hpc_ops = ctrl->hpc_ops; + slot->number = ctrl->first_slot + (ctrl->slot_num_inc * i); mutex_init(&slot->lock); - - if (shpchprm_get_physical_slot_number(ctrl, &sun, - slot->bus, slot->device)) - goto error_info; - - slot->number = sun; INIT_DELAYED_WORK(&slot->work, queue_pushbutton_work); /* register this slot with the hotplug pci core */