|
@@ -104,23 +104,6 @@ static void make_slot_name(struct slot *slot)
|
|
slot->bus, slot->number);
|
|
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)
|
|
static int init_slots(struct controller *ctrl)
|
|
{
|
|
{
|
|
struct slot *slot;
|
|
struct slot *slot;
|
|
@@ -128,7 +111,6 @@ static int init_slots(struct controller *ctrl)
|
|
struct hotplug_slot_info *info;
|
|
struct hotplug_slot_info *info;
|
|
int retval = -ENOMEM;
|
|
int retval = -ENOMEM;
|
|
int i;
|
|
int i;
|
|
- u32 sun;
|
|
|
|
|
|
|
|
for (i = 0; i < ctrl->num_slots; i++) {
|
|
for (i = 0; i < ctrl->num_slots; i++) {
|
|
slot = kzalloc(sizeof(*slot), GFP_KERNEL);
|
|
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->bus = ctrl->pci_dev->subordinate->number;
|
|
slot->device = ctrl->slot_device_offset + i;
|
|
slot->device = ctrl->slot_device_offset + i;
|
|
slot->hpc_ops = ctrl->hpc_ops;
|
|
slot->hpc_ops = ctrl->hpc_ops;
|
|
|
|
+ slot->number = ctrl->first_slot + (ctrl->slot_num_inc * i);
|
|
mutex_init(&slot->lock);
|
|
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);
|
|
INIT_DELAYED_WORK(&slot->work, queue_pushbutton_work);
|
|
|
|
|
|
/* register this slot with the hotplug pci core */
|
|
/* register this slot with the hotplug pci core */
|