From 00e3549caef6bd6db852903c287471a139629af4 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Fri, 13 Apr 2007 15:34:18 -0700 Subject: [PATCH] --- yaml --- r: 53371 b: refs/heads/master c: c02929c278f2bca68635e4c2daa00b7825d71061 h: refs/heads/master i: 53369: cb31cafbb3f4a68068983f0c1358d3c1685aa022 53367: bfc0e42cb8590fb2291497183dc5c83b11972e3e v: v3 --- [refs] | 2 +- trunk/drivers/pci/hotplug/rpaphp.h | 1 - trunk/drivers/pci/hotplug/rpaphp_core.c | 21 ++++++++++----------- trunk/drivers/pci/hotplug/rpaphp_slot.c | 12 ------------ 4 files changed, 11 insertions(+), 25 deletions(-) diff --git a/[refs] b/[refs] index f72678d3e7d5..3af0d0f77136 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 307ff12e35526cfab9f09cafcb17239286e6eb85 +refs/heads/master: c02929c278f2bca68635e4c2daa00b7825d71061 diff --git a/trunk/drivers/pci/hotplug/rpaphp.h b/trunk/drivers/pci/hotplug/rpaphp.h index a2b22575cf77..e28e93cd00fd 100644 --- a/trunk/drivers/pci/hotplug/rpaphp.h +++ b/trunk/drivers/pci/hotplug/rpaphp.h @@ -102,6 +102,5 @@ extern void dealloc_slot_struct(struct slot *slot); extern struct slot *alloc_slot_struct(struct device_node *dn, int drc_index, char *drc_name, int power_domain); extern int rpaphp_register_slot(struct slot *slot); extern int rpaphp_deregister_slot(struct slot *slot); -extern int rpaphp_set_attention_status(struct slot *slot, u8 status); #endif /* _PPC64PHP_H */ diff --git a/trunk/drivers/pci/hotplug/rpaphp_core.c b/trunk/drivers/pci/hotplug/rpaphp_core.c index 3970cacc0b86..e9c157d30e82 100644 --- a/trunk/drivers/pci/hotplug/rpaphp_core.c +++ b/trunk/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; } /** diff --git a/trunk/drivers/pci/hotplug/rpaphp_slot.c b/trunk/drivers/pci/hotplug/rpaphp_slot.c index 30c9dc98e4ec..d4ee8723fcb3 100644 --- a/trunk/drivers/pci/hotplug/rpaphp_slot.c +++ b/trunk/drivers/pci/hotplug/rpaphp_slot.c @@ -184,15 +184,3 @@ int rpaphp_register_slot(struct slot *slot) return retval; } -int rpaphp_set_attention_status(struct slot *slot, u8 status) -{ - int rc; - - /* status: LED_OFF or LED_ON */ - rc = rtas_set_indicator(DR_INDICATOR, slot->index, status); - if (rc < 0) - err("slot(name=%s location=%s index=0x%x) set attention-status(%d) failed! rc=0x%x\n", - slot->name, slot->location, slot->index, status, rc); - - return rc; -}