aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/hotplug/sgi_hotplug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c
index cfee9db52c4..f31d83c2c63 100644
--- a/drivers/pci/hotplug/sgi_hotplug.c
+++ b/drivers/pci/hotplug/sgi_hotplug.c
@@ -461,10 +461,12 @@ static inline int get_power_status(struct hotplug_slot *bss_hotplug_slot,
461{ 461{
462 struct slot *slot = bss_hotplug_slot->private; 462 struct slot *slot = bss_hotplug_slot->private;
463 struct pcibus_info *pcibus_info; 463 struct pcibus_info *pcibus_info;
464 u32 power;
464 465
465 pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus); 466 pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus);
466 mutex_lock(&sn_hotplug_mutex); 467 mutex_lock(&sn_hotplug_mutex);
467 *value = pcibus_info->pbi_enabled_devices & (1 << slot->device_num); 468 power = pcibus_info->pbi_enabled_devices & (1 << slot->device_num);
469 *value = power ? 1 : 0;
468 mutex_unlock(&sn_hotplug_mutex); 470 mutex_unlock(&sn_hotplug_mutex);
469 return 0; 471 return 0;
470} 472}