aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug/rpaphp_core.c
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2007-04-13 15:34:18 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 19:02:39 -0700
commitc02929c278f2bca68635e4c2daa00b7825d71061 (patch)
tree40dd251da30e8c3f18c6e0724a7c601ce562682e /drivers/pci/hotplug/rpaphp_core.c
parent307ff12e35526cfab9f09cafcb17239286e6eb85 (diff)
PCI: rpaphp: remove rpaphp_set_attention_status()
The rpaphp_set_attention_status() routine seems to be a wrapper around a single rtas call. Abolish it. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/rpaphp_core.c')
-rw-r--r--drivers/pci/hotplug/rpaphp_core.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c
index 3970cacc0b8..e9c157d30e8 100644
--- a/drivers/pci/hotplug/rpaphp_core.c
+++ b/drivers/pci/hotplug/rpaphp_core.c
@@ -63,27 +63,26 @@ module_param(debug, bool, 0644);
*/
static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value)
{
- int retval = 0;
+ int rc;
struct slot *slot = (struct slot *)hotplug_slot->private;
down(&rpaphp_sem);
switch (value) {
case 0:
- retval = rpaphp_set_attention_status(slot, LED_OFF);
- hotplug_slot->info->attention_status = 0;
- break;
case 1:
- default:
- retval = rpaphp_set_attention_status(slot, LED_ON);
- hotplug_slot->info->attention_status = 1;
- break;
case 2:
- retval = rpaphp_set_attention_status(slot, LED_ID);
- hotplug_slot->info->attention_status = 2;
+ break;
+ default:
+ value = 1;
break;
}
up(&rpaphp_sem);
- return retval;
+
+ rc = rtas_set_indicator(DR_INDICATOR, slot->index, value);
+ if (!rc)
+ hotplug_slot->info->attention_status = value;
+
+ return rc;
}
/**