From: Todd Poynor Date: Sat, 28 Jul 2018 05:21:57 +0000 (-0700) Subject: staging: gasket: apex: fixup undefined PCI class X-Git-Tag: v4.19-rc1~101^2~266 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=f390d08d8b872a0f71db45bc970a238475679fac;p=linux.git staging: gasket: apex: fixup undefined PCI class Apex chips with class 0 (PCI_CLASS_NOT_DEFINED) fixed up to PCI_CLASS_SYSTEM_OTHER to enable PCI resource assignments. Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c index 73fc2683a834..ab466d49608a 100644 --- a/drivers/staging/gasket/apex_driver.c +++ b/drivers/staging/gasket/apex_driver.c @@ -739,3 +739,10 @@ static ssize_t sysfs_show( gasket_sysfs_put_device_data(device, gasket_dev); return ret; } + +static void apex_pci_fixup_class(struct pci_dev *pdev) +{ + pdev->class = (PCI_CLASS_SYSTEM_OTHER << 8) | pdev->class; +} +DECLARE_PCI_FIXUP_CLASS_HEADER(APEX_PCI_VENDOR_ID, APEX_PCI_DEVICE_ID, + PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class);