161 if (ind < size && des->slot.slot_num == id)
162 ret = des;
163
164ibm_slot_done:
165 if (ret) {
166 ret = kmalloc(sizeof(union apci_descriptor), GFP_KERNEL);
167 memcpy(ret, des, sizeof(union apci_descriptor));
168 }
169 kfree(table);
170 return ret;
171}
172
173
174
175
176
177
178
179
180
181static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status)
182{
183 union acpi_object args[2];
184 struct acpi_object_list params = { .pointer = args, .count = 2 };
185 acpi_status stat;
186 unsigned long long rc;
187 union apci_descriptor *ibm_slot;
188
189 ibm_slot = ibm_slot_from_id(hpslot_to_sun(slot));
190
191 dbg("%s: set slot %d (%d) attention status to %d\n", __func__,
192 ibm_slot->slot.slot_num, ibm_slot->slot.slot_id,
193 (status ? 1 : 0));
194
195 args[0].type = ACPI_TYPE_INTEGER;
196 args[0].integer.value = ibm_slot->slot.slot_id;
197 args[1].type = ACPI_TYPE_INTEGER;
198 args[1].integer.value = (status) ? 1 : 0;
199
200 kfree(ibm_slot);
201