diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2006-12-16 18:25:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-20 13:54:44 -0500 |
commit | 6f39be2e05cc6e66481f1395264297f06bef1e21 (patch) | |
tree | bf4bc5815bdb4c1f4f0c40e60413dcd1948a0af7 | |
parent | 227b84c77f5fb3a3b01e5dee1a2928cafc5fd216 (diff) |
shpchp: remove shpchprm_get_physical_slot_number
This patch removes unnecessary shpchprm_get_physical_slot_number()
function.
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>
-rw-r--r-- | drivers/pci/hotplug/shpchp_core.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c index b64999d59f57..24d1afa4cf97 100644 --- a/drivers/pci/hotplug/shpchp_core.c +++ b/drivers/pci/hotplug/shpchp_core.c | |||
@@ -104,23 +104,6 @@ static void make_slot_name(struct slot *slot) | |||
104 | slot->bus, slot->number); | 104 | slot->bus, slot->number); |
105 | } | 105 | } |
106 | 106 | ||
107 | |||
108 | |||
109 | |||
110 | static int | ||
111 | shpchprm_get_physical_slot_number(struct controller *ctrl, u32 *sun, | ||
112 | u8 busnum, u8 devnum) | ||
113 | { | ||
114 | int offset = devnum - ctrl->slot_device_offset; | ||
115 | |||
116 | dbg("%s: ctrl->slot_num_inc %d, offset %d\n", __FUNCTION__, | ||
117 | ctrl->slot_num_inc, offset); | ||
118 | *sun = (u8) (ctrl->first_slot + ctrl->slot_num_inc *offset); | ||
119 | return 0; | ||
120 | } | ||
121 | |||
122 | |||
123 | |||
124 | static int init_slots(struct controller *ctrl) | 107 | static int init_slots(struct controller *ctrl) |
125 | { | 108 | { |
126 | struct slot *slot; | 109 | struct slot *slot; |
@@ -128,7 +111,6 @@ static int init_slots(struct controller *ctrl) | |||
128 | struct hotplug_slot_info *info; | 111 | struct hotplug_slot_info *info; |
129 | int retval = -ENOMEM; | 112 | int retval = -ENOMEM; |
130 | int i; | 113 | int i; |
131 | u32 sun; | ||
132 | 114 | ||
133 | for (i = 0; i < ctrl->num_slots; i++) { | 115 | for (i = 0; i < ctrl->num_slots; i++) { |
134 | slot = kzalloc(sizeof(*slot), GFP_KERNEL); | 116 | slot = kzalloc(sizeof(*slot), GFP_KERNEL); |
@@ -152,13 +134,8 @@ static int init_slots(struct controller *ctrl) | |||
152 | slot->bus = ctrl->pci_dev->subordinate->number; | 134 | slot->bus = ctrl->pci_dev->subordinate->number; |
153 | slot->device = ctrl->slot_device_offset + i; | 135 | slot->device = ctrl->slot_device_offset + i; |
154 | slot->hpc_ops = ctrl->hpc_ops; | 136 | slot->hpc_ops = ctrl->hpc_ops; |
137 | slot->number = ctrl->first_slot + (ctrl->slot_num_inc * i); | ||
155 | mutex_init(&slot->lock); | 138 | mutex_init(&slot->lock); |
156 | |||
157 | if (shpchprm_get_physical_slot_number(ctrl, &sun, | ||
158 | slot->bus, slot->device)) | ||
159 | goto error_info; | ||
160 | |||
161 | slot->number = sun; | ||
162 | INIT_DELAYED_WORK(&slot->work, queue_pushbutton_work); | 139 | INIT_DELAYED_WORK(&slot->work, queue_pushbutton_work); |
163 | 140 | ||
164 | /* register this slot with the hotplug pci core */ | 141 | /* register this slot with the hotplug pci core */ |