Re: [PATCH 1/3] brcm80211: replace VENDOR_BROADCOM with PCI_VENDOR_ID_BROADCOM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Stani.

Acked-by: Roland Vossen <rvossen@xxxxxxxxxxxx>

On 03/27/2011 11:31 PM, Stanislav Fomichev wrote:
use Linux native defines

Signed-off-by: Stanislav Fomichev<kernel@xxxxxxxxxxx>
---
  drivers/staging/brcm80211/brcmfmac/bcmsdh.c       |    3 ++-
  drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c |    6 +++---
  drivers/staging/brcm80211/brcmfmac/dhd_sdio.c     |    3 ++-
  drivers/staging/brcm80211/brcmsmac/wlc_bmac.c     |    2 +-
  drivers/staging/brcm80211/brcmsmac/wlc_main.c     |    3 ++-
  drivers/staging/brcm80211/include/bcmdevs.h       |    3 ---
  drivers/staging/brcm80211/util/siutils.c          |    6 +++---
  7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
index 473f57d..f15ee63 100644
--- a/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
@@ -17,6 +17,7 @@

  #include<linux/types.h>
  #include<linux/netdevice.h>
+#include<linux/pci_ids.h>
  #include<bcmdefs.h>
  #include<bcmdevs.h>
  #include<bcmutils.h>
@@ -580,7 +581,7 @@ int bcmsdh_stop(void *sdh)
  int bcmsdh_query_device(void *sdh)
  {
  	bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
-	bcmsdh->vendevid = (VENDOR_BROADCOM<<  16) | 0;
+	bcmsdh->vendevid = (PCI_VENDOR_ID_BROADCOM<<  16) | 0;
  	return bcmsdh->vendevid;
  }

diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c
index e3556ff..5085a02 100644
--- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c
+++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c
@@ -87,11 +87,11 @@ bool bcmsdh_chipmatch(u16 vendor, u16 device)
  		return true;

  	/* Check for BRCM 27XX Standard host controller */
-	if (device == BCM27XX_SDIOH_ID&&  vendor == VENDOR_BROADCOM)
+	if (device == BCM27XX_SDIOH_ID&&  vendor == PCI_VENDOR_ID_BROADCOM)
  		return true;

  	/* Check for BRCM Standard host controller */
-	if (device == SDIOH_FPGA_ID&&  vendor == VENDOR_BROADCOM)
+	if (device == SDIOH_FPGA_ID&&  vendor == PCI_VENDOR_ID_BROADCOM)
  		return true;

  	/* Check for TI PCIxx21 Standard host controller */
@@ -111,7 +111,7 @@ bool bcmsdh_chipmatch(u16 vendor, u16 device)
  #endif				/* BCMSDIOH_STD */
  #ifdef BCMSDIOH_SPI
  	/* This is the PciSpiHost. */
-	if (device == SPIH_FPGA_ID&&  vendor == VENDOR_BROADCOM) {
+	if (device == SPIH_FPGA_ID&&  vendor == PCI_VENDOR_ID_BROADCOM) {
  		WL_NONE("Found PCI SPI Host Controller\n");
  		return true;
  	}
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
index 1066270..1111920 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
@@ -15,6 +15,7 @@
   */

  #include<linux/types.h>
+#include<linux/pci_ids.h>
  #include<bcmdefs.h>
  #include<linux/netdevice.h>
  #include<bcmsdh.h>
@@ -5089,7 +5090,7 @@ static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no,
  	/* Check the Vendor ID */
  	switch (venid) {
  	case 0x0000:
-	case VENDOR_BROADCOM:
+	case PCI_VENDOR_ID_BROADCOM:
  		break;
  	default:
  		DHD_ERROR(("%s: unknown vendor: 0x%04x\n", __func__, venid));
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
index 5a96dc3..e40b594 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
@@ -2034,7 +2034,7 @@ static bool wlc_validboardtype(struct wlc_hw_info *wlc_hw)
  			goodboard = false;
  	}

-	if (wlc_hw->sih->boardvendor != VENDOR_BROADCOM)
+	if (wlc_hw->sih->boardvendor != PCI_VENDOR_ID_BROADCOM)
  		return goodboard;

  	return goodboard;
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_main.c b/drivers/staging/brcm80211/brcmsmac/wlc_main.c
index 639b5d7..8124c47 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_main.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_main.c
@@ -16,6 +16,7 @@
  #include<linux/kernel.h>
  #include<linux/ctype.h>
  #include<linux/etherdevice.h>
+#include<linux/pci_ids.h>
  #include<net/mac80211.h>

  #include<bcmdefs.h>
@@ -4871,7 +4872,7 @@ void wlc_statsupd(struct wlc_info *wlc)

  bool wlc_chipmatch(u16 vendor, u16 device)
  {
-	if (vendor != VENDOR_BROADCOM) {
+	if (vendor != PCI_VENDOR_ID_BROADCOM) {
  		WL_ERROR("wlc_chipmatch: unknown vendor id %04x\n", vendor);
  		return false;
  	}
diff --git a/drivers/staging/brcm80211/include/bcmdevs.h b/drivers/staging/brcm80211/include/bcmdevs.h
index 075883a..7ccb252 100644
--- a/drivers/staging/brcm80211/include/bcmdevs.h
+++ b/drivers/staging/brcm80211/include/bcmdevs.h
@@ -17,9 +17,6 @@
  #ifndef	_BCMDEVS_H
  #define	_BCMDEVS_H

-/* PCI vendor IDs */
-#define	VENDOR_BROADCOM		0x14e4
-
  /* DONGLE VID/PIDs */
  #define BCM_DNGL_VID		0x0a5c
  #define BCM_DNGL_BDC_PID	0x0bdc
diff --git a/drivers/staging/brcm80211/util/siutils.c b/drivers/staging/brcm80211/util/siutils.c
index ed168ce..29ded05 100644
--- a/drivers/staging/brcm80211/util/siutils.c
+++ b/drivers/staging/brcm80211/util/siutils.c
@@ -337,14 +337,14 @@ static __used void si_nvram_process(si_info_t *sii, char *pvars)

  #ifdef BCMSDIO
  	case SPI_BUS:
-		sii->pub.boardvendor = VENDOR_BROADCOM;
+		sii->pub.boardvendor = PCI_VENDOR_ID_BROADCOM;
  		sii->pub.boardtype = SPI_BOARD;
  		break;
  #endif

  	case SI_BUS:
  	case JTAG_BUS:
-		sii->pub.boardvendor = VENDOR_BROADCOM;
+		sii->pub.boardvendor = PCI_VENDOR_ID_BROADCOM;
  		sii->pub.boardtype = getintvar(pvars, "prodid");
  		if (pvars == NULL || (sii->pub.boardtype == 0)) {
  			sii->pub.boardtype = getintvar(NULL, "boardtype");
@@ -1918,7 +1918,7 @@ bool si_deviceremoved(si_t *sih)
  	case PCI_BUS:
  		ASSERT(sii->pbus != NULL);
  		pci_read_config_dword(sii->pbus, PCI_CFG_VID,&w);
-		if ((w&  0xFFFF) != VENDOR_BROADCOM)
+		if ((w&  0xFFFF) != PCI_VENDOR_ID_BROADCOM)
  			return true;
  		break;
  	}


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux