diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2019-08-01 16:44:22 +1000 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2019-08-02 15:22:07 +1000 |
commit | 9142bb3b3de26d6b77b1eee24e36414a9b95f9cb (patch) | |
tree | f708e296fea0e4d426a899824e824caa62a45e0c | |
parent | 2554cac82da530acfcb1a575c571e760de92dde4 (diff) | |
download | skiboot-9142bb3b3de26d6b77b1eee24e36414a9b95f9cb.zip skiboot-9142bb3b3de26d6b77b1eee24e36414a9b95f9cb.tar.gz skiboot-9142bb3b3de26d6b77b1eee24e36414a9b95f9cb.tar.bz2 |
core/pci-quirk: Re-order struct members
Having the function first throws out the alignment on the VDID since the
functions names are probably different lengths. Swap them ordering of
the struct members so the VDID comes first to keep things tidy.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Stewart Smith <stewart@linux.ibm.com>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
-rw-r--r-- | core/pci-quirk.c | 4 | ||||
-rw-r--r-- | core/test/run-pci-quirk.c | 4 | ||||
-rw-r--r-- | include/pci-quirk.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/core/pci-quirk.c b/core/pci-quirk.c index e8f9d22..6832b9c 100644 --- a/core/pci-quirk.c +++ b/core/pci-quirk.c @@ -43,8 +43,8 @@ static void quirk_astbmc_vga(struct phb *phb __unused, /* Quirks are: {fixup function, vendor ID, (device ID or PCI_ANY_ID)} */ static const struct pci_quirk quirk_table[] = { /* ASPEED 2400 VGA device */ - { &quirk_astbmc_vga, 0x1a03, 0x2000 }, - { NULL, 0, 0 } + { 0x1a03, 0x2000, &quirk_astbmc_vga }, + { 0, 0, NULL } }; static void __pci_handle_quirk(struct phb *phb, struct pci_device *pd, diff --git a/core/test/run-pci-quirk.c b/core/test/run-pci-quirk.c index 2f71302..4c57c61 100644 --- a/core/test/run-pci-quirk.c +++ b/core/test/run-pci-quirk.c @@ -42,8 +42,8 @@ static void test_fixup(struct phb *phb __unused, struct pci_device *pd __unused) /* Quirks are: {fixup function, vendor ID, (device ID or PCI_ANY_ID)} */ static const struct pci_quirk test_quirk_table[] = { /* ASPEED 2400 VGA device */ - { &test_fixup, 0x1a03, 0x2000 }, - { NULL, 0, 0 } + { 0x1a03, 0x2000, &test_fixup }, + { 0, 0, NULL } }; #define PCI_COMPOSE_VDID(vendor, device) (((device) << 16) | (vendor)) diff --git a/include/pci-quirk.h b/include/pci-quirk.h index 784970c..0ad5555 100644 --- a/include/pci-quirk.h +++ b/include/pci-quirk.h @@ -9,9 +9,9 @@ #define PCI_ANY_ID 0xFFFF struct pci_quirk { - void (*fixup)(struct phb *, struct pci_device *); uint16_t vendor_id; uint16_t device_id; + void (*fixup)(struct phb *, struct pci_device *); }; void pci_handle_quirk(struct phb *phb, struct pci_device *pd); |