summaryrefslogtreecommitdiff
path: root/src/southbridge/amd/pi
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/amd/pi')
-rw-r--r--src/southbridge/amd/pi/hudson/hudson.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/southbridge/amd/pi/hudson/hudson.c b/src/southbridge/amd/pi/hudson/hudson.c
index a1c805dea1..bd9deb135b 100644
--- a/src/southbridge/amd/pi/hudson/hudson.c
+++ b/src/southbridge/amd/pi/hudson/hudson.c
@@ -59,12 +59,9 @@ void hudson_enable(struct device *dev)
{
printk(BIOS_DEBUG, "hudson_enable()\n");
switch (dev->path.pci.devfn) {
- case (0x14 << 3) | 7: /* 0:14.7 SD */
+ case PCI_DEVFN(0x14, 7): /* SD */
if (dev->enabled == 0) {
- // read the VENDEV ID
- struct device *sd_dev =
- dev_find_slot( 0, PCI_DEVFN( 0x14, 7));
- u32 sd_device_id = pci_read_config32( sd_dev, 0) >> 16;
+ u32 sd_device_id = pci_read_config32(dev, 0) >> 16;
/* turn off the SDHC controller in the PM reg */
u8 reg8;
if (sd_device_id == PCI_DEVICE_ID_AMD_HUDSON_SD) {