Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 427310ff authored by Linas Vepstas's avatar Linas Vepstas Committed by Greg Kroah-Hartman
Browse files

PCI: rpaphp: Remve another call that is a wrapper



Remove another stovepipe: a call which wraps another call, and
just adds printks.

Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
Cc: John Rose <johnrose@austin.ibm.com>
Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 517d5a04
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -103,7 +103,6 @@ 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 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_register_slot(struct slot *slot);
extern int rpaphp_deregister_slot(struct slot *slot);
extern int rpaphp_deregister_slot(struct slot *slot);
extern int rpaphp_get_power_status(struct slot *slot, u8 * value);
extern int rpaphp_set_attention_status(struct slot *slot, u8 status);
extern int rpaphp_set_attention_status(struct slot *slot, u8 status);
	
	
#endif				/* _PPC64PHP_H */
#endif				/* _PPC64PHP_H */
+4 −2
Original line number Original line Diff line number Diff line
@@ -100,11 +100,13 @@ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value)
 */
 */
static int get_power_status(struct hotplug_slot *hotplug_slot, u8 * value)
static int get_power_status(struct hotplug_slot *hotplug_slot, u8 * value)
{
{
	int retval;
	int retval, level;
	struct slot *slot = (struct slot *)hotplug_slot->private;
	struct slot *slot = (struct slot *)hotplug_slot->private;


	down(&rpaphp_sem);
	down(&rpaphp_sem);
	retval = rpaphp_get_power_status(slot, value);
	retval = rtas_get_power_level (slot->power_domain, &level);
	if (!retval)
		*value = level;
	up(&rpaphp_sem);
	up(&rpaphp_sem);
	return retval;
	return retval;
}
}
+6 −1
Original line number Original line Diff line number Diff line
@@ -183,9 +183,14 @@ static int setup_pci_slot(struct slot *slot)


int rpaphp_register_pci_slot(struct slot *slot)
int rpaphp_register_pci_slot(struct slot *slot)
{
{
	int rc, level;
	struct hotplug_slot_info *info = slot->hotplug_slot->info;
	struct hotplug_slot_info *info = slot->hotplug_slot->info;


	rpaphp_get_power_status(slot, &info->power_status);
	rc = rtas_get_power_level(slot->power_domain, &level);
	if (rc)
		return rc;
	info->power_status = level;

	rpaphp_get_pci_adapter_status(slot, 1, &info->adapter_status);
	rpaphp_get_pci_adapter_status(slot, 1, &info->adapter_status);


	if (info->adapter_status == NOT_VALID) {
	if (info->adapter_status == NOT_VALID) {
+0 −18
Original line number Original line Diff line number Diff line
@@ -184,24 +184,6 @@ int rpaphp_register_slot(struct slot *slot)
	return retval;
	return retval;
}
}


int rpaphp_get_power_status(struct slot *slot, u8 * value)
{
	int rc = 0, level;
	
	rc = rtas_get_power_level(slot->power_domain, &level);
	if (rc < 0) {
		err("failed to get power-level for slot(%s), rc=0x%x\n",
			slot->location, rc);
		return rc;
	}

	dbg("%s the power level of slot %s(pwd-domain:0x%x) is %d\n",
		__FUNCTION__, slot->name, slot->power_domain, level);
	*value = level;

	return rc;
}

int rpaphp_set_attention_status(struct slot *slot, u8 status)
int rpaphp_set_attention_status(struct slot *slot, u8 status)
{
{
	int rc;
	int rc;