/* cpqhp_set_attention_status - Turns the Amber LED for a slot on or off @ctrl: struct controller to use @func: PCI device/function info @status: LED control flag: 1 = LED on, 0 = LED off  */
static int cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func, u32 status)
/* cpqhp_set_attention_status - Turns the Amber LED for a slot on or off @ctrl: struct controller to use @func: PCI device/function info @status: LED control flag: 1 = LED on, 0 = LED off  */
static int cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func, u32 status)
{
	u8 hp_slot;
	if (func == NULL)
		return 1;
	hp_slot = func->device - ctrl->slot_device_offset;
	mutex_lock(&ctrl->crit_sect);
	if (status == 1)
		amber_LED_on (ctrl, hp_slot);
	else if (status == 0)
		amber_LED_off (ctrl, hp_slot);
	else {
		mutex_unlock(&ctrl->crit_sect);
		return 1;
	}
	set_SOGO(ctrl);
	wait_for_ctrl_irq (ctrl);
	mutex_unlock(&ctrl->crit_sect);
	return 0;
}