From: Luis R. Rodriguez Date: Wed, 13 Jan 2010 19:06:55 +0000 (-0800) Subject: Backport access to pcidev->is_pcie member for kernels < 2.6.24 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6ba1755cb78cb4d3c2a5f50c564233ff780775f9;p=openwrt%2Fstaging%2Fblogic.git Backport access to pcidev->is_pcie member for kernels < 2.6.24 Older kernels than 2.6.24 do not have the is_pcie member as part of the struct pci_dev, to help with that we use the compat-2.6.24.c supplied compat_is_pcie() when needed. Signed-off-by: Luis R. Rodriguez --- diff --git a/patches/20-pcidev.patch b/patches/20-pcidev.patch new file mode 100644 index 000000000000..b93ef338e122 --- /dev/null +++ b/patches/20-pcidev.patch @@ -0,0 +1,18 @@ +Older kernels than 2.6.24 do not have the is_pcie member as part of +the struct pci_dev, to help with that we use the compat-2.6.24.c supplied +compat_is_pcie() when needed. + +--- a/drivers/net/wireless/ath/ath9k/pci.c 2010-01-13 10:48:29.000000000 -0800 ++++ b/drivers/net/wireless/ath/ath9k/pci.c 2010-01-13 10:49:52.000000000 -0800 +@@ -88,7 +88,11 @@ static void ath_pci_bt_coex_prep(struct + struct pci_dev *pdev = to_pci_dev(sc->dev); + u8 aspm; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + if (!pdev->is_pcie) ++#else ++ if (!compat_is_pcie(pdev)) ++#endif + return; + + pci_read_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, &aspm);