[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/4] hw:piix4:acpi: replace enable|disable_device()
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH 1/4] hw:piix4:acpi: replace enable|disable_device() with oneliners |
Date: |
Tue, 21 Jan 2014 15:40:03 +0100 |
enable_device() and disable_device() functions aren't reused anywere,
so replace them with respective oneliners at call sites.
Signed-off-by: Igor Mammedov <address@hidden>
---
hw/acpi/pcihp.c | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
index 3fa3d7c..b86ebfa 100644
--- a/hw/acpi/pcihp.c
+++ b/hw/acpi/pcihp.c
@@ -185,16 +185,6 @@ void acpi_pcihp_reset(AcpiPciHpState *s)
acpi_pcihp_update(s);
}
-static void enable_device(AcpiPciHpState *s, unsigned bsel, int slot)
-{
- s->acpi_pcihp_pci_status[bsel].device_present |= (1U << slot);
-}
-
-static void disable_device(AcpiPciHpState *s, unsigned bsel, int slot)
-{
- s->acpi_pcihp_pci_status[bsel].down |= (1U << slot);
-}
-
int acpi_pcihp_device_hotplug(AcpiPciHpState *s, PCIDevice *dev,
PCIHotplugState state)
{
@@ -213,9 +203,9 @@ int acpi_pcihp_device_hotplug(AcpiPciHpState *s, PCIDevice
*dev,
}
if (state == PCI_HOTPLUG_ENABLED) {
- enable_device(s, bsel, slot);
+ s->acpi_pcihp_pci_status[bsel].device_present |= (1U << slot);
} else {
- disable_device(s, bsel, slot);
+ s->acpi_pcihp_pci_status[bsel].down |= (1U << slot);
}
return 0;
--
1.7.1