[rt2x00-users] [PATCH 1/8] rt2x00: disable pci code if CONFIG_PCI is not defined

Gabor Juhos juhosg at openwrt.org
Thu Nov 29 07:49:23 AEDT 2012


> 
> diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
> index a0c8cae..fa20add 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
> @@ -208,6 +208,7 @@ void rt2x00pci_uninitialize(struct rt2x00_dev *rt2x00dev)
>  }
>  EXPORT_SYMBOL_GPL(rt2x00pci_uninitialize);
>  
> +#ifdef CONFIG_PCI
>  /*
>   * PCI driver handlers.
>   */
> @@ -392,6 +393,7 @@ int rt2x00pci_resume(struct pci_dev *pci_dev)
>  }
>  EXPORT_SYMBOL_GPL(rt2x00pci_resume);
>  #endif /* CONFIG_PM */
> +#endif /* CONFIG_PCI */
>  
>  /*
>   * rt2x00pci module information.
> 

It seems that this patch is not needed anymore, and it can be removed from
OpenWrt as well.

rt2x00pci.c only builds if RT2X00_LIB_PCI is selected. RT2X00_LIB_PCI is
unconditionally selected by RT2400PCI, RT2500PCI and RT61PCI but all these
options depends on PCI. Additionally RT2X00_LIB_PCI is selected by RT2800_PCI
but only if PCI is enabled.

In other words, CONFIG_RT2X00_LIB_PCI will be selected only if CONFIG_PCI is
enabled, so the ifdef is superfluous.

-Gabor




More information about the users mailing list