diff options
author | Linas Vepstas <linas@austin.ibm.com> | 2007-04-13 18:34:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-05-02 22:02:39 -0400 |
commit | c02929c278f2bca68635e4c2daa00b7825d71061 (patch) | |
tree | 40dd251da30e8c3f18c6e0724a7c601ce562682e /drivers/pci/hotplug | |
parent | 307ff12e35526cfab9f09cafcb17239286e6eb85 (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')
-rw-r--r-- | drivers/pci/hotplug/rpaphp.h | 1 | ||||
-rw-r--r-- | drivers/pci/hotplug/rpaphp_core.c | 21 | ||||
-rw-r--r-- | drivers/pci/hotplug/rpaphp_slot.c | 12 |
3 files changed, 10 insertions, 24 deletions
diff --git a/drivers/pci/hotplug/rpaphp.h b/drivers/pci/hotplug/rpaphp.h index a2b22575cf77..e28e93cd00fd 100644 --- a/drivers/pci/hotplug/rpaphp.h +++ b/drivers/pci/hotplug/rpaphp.h | |||
@@ -102,6 +102,5 @@ extern void dealloc_slot_struct(struct slot *slot); | |||
102 | extern struct slot *alloc_slot_struct(struct device_node *dn, int drc_index, char *drc_name, int power_domain); | 102 | extern struct slot *alloc_slot_struct(struct device_node *dn, int drc_index, char *drc_name, int power_domain); |
103 | extern int rpaphp_register_slot(struct slot *slot); | 103 | extern int rpaphp_register_slot(struct slot *slot); |
104 | extern int rpaphp_deregister_slot(struct slot *slot); | 104 | extern int rpaphp_deregister_slot(struct slot *slot); |
105 | extern int rpaphp_set_attention_status(struct slot *slot, u8 status); | ||
106 | 105 | ||
107 | #endif /* _PPC64PHP_H */ | 106 | #endif /* _PPC64PHP_H */ |
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index 3970cacc0b86..e9c157d30e82 100644 --- a/drivers/pci/hotplug/rpaphp_core.c +++ b/drivers/pci/hotplug/rpaphp_core.c | |||
@@ -63,27 +63,26 @@ module_param(debug, bool, 0644); | |||
63 | */ | 63 | */ |
64 | static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value) | 64 | static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value) |
65 | { | 65 | { |
66 | int retval = 0; | 66 | int rc; |
67 | struct slot *slot = (struct slot *)hotplug_slot->private; | 67 | struct slot *slot = (struct slot *)hotplug_slot->private; |
68 | 68 | ||
69 | down(&rpaphp_sem); | 69 | down(&rpaphp_sem); |
70 | switch (value) { | 70 | switch (value) { |
71 | case 0: | 71 | case 0: |
72 | retval = rpaphp_set_attention_status(slot, LED_OFF); | ||
73 | hotplug_slot->info->attention_status = 0; | ||
74 | break; | ||
75 | case 1: | 72 | case 1: |
76 | default: | ||
77 | retval = rpaphp_set_attention_status(slot, LED_ON); | ||
78 | hotplug_slot->info->attention_status = 1; | ||
79 | break; | ||
80 | case 2: | 73 | case 2: |
81 | retval = rpaphp_set_attention_status(slot, LED_ID); | 74 | break; |
82 | hotplug_slot->info->attention_status = 2; | 75 | default: |
76 | value = 1; | ||
83 | break; | 77 | break; |
84 | } | 78 | } |
85 | up(&rpaphp_sem); | 79 | up(&rpaphp_sem); |
86 | return retval; | 80 | |
81 | rc = rtas_set_indicator(DR_INDICATOR, slot->index, value); | ||
82 | if (!rc) | ||
83 | hotplug_slot->info->attention_status = value; | ||
84 | |||
85 | return rc; | ||
87 | } | 86 | } |
88 | 87 | ||
89 | /** | 88 | /** |
diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c index 30c9dc98e4ec..d4ee8723fcb3 100644 --- a/drivers/pci/hotplug/rpaphp_slot.c +++ b/drivers/pci/hotplug/rpaphp_slot.c | |||
@@ -184,15 +184,3 @@ sysfs_fail: | |||
184 | return retval; | 184 | return retval; |
185 | } | 185 | } |
186 | 186 | ||
187 | int rpaphp_set_attention_status(struct slot *slot, u8 status) | ||
188 | { | ||
189 | int rc; | ||
190 | |||
191 | /* status: LED_OFF or LED_ON */ | ||
192 | rc = rtas_set_indicator(DR_INDICATOR, slot->index, status); | ||
193 | if (rc < 0) | ||
194 | err("slot(name=%s location=%s index=0x%x) set attention-status(%d) failed! rc=0x%x\n", | ||
195 | slot->name, slot->location, slot->index, status, rc); | ||
196 | |||
197 | return rc; | ||
198 | } | ||