Don't use generic PCI_VENDOR and PCI_PRODUCT macros. Prefix them with
BKTR_ to avoid possible conflicts.
This commit is contained in:
parent
74333b3dee
commit
b7841bd0eb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335606
@ -572,9 +572,9 @@ bktr_store_address(unit, BKTR_MEM_BUF, buf);
|
||||
|
||||
/* using the pci device id and revision id */
|
||||
/* and determine the card type */
|
||||
if (PCI_VENDOR(pci_id) == PCI_VENDOR_BROOKTREE)
|
||||
if (BKTR_PCI_VENDOR(pci_id) == PCI_VENDOR_BROOKTREE)
|
||||
{
|
||||
switch (PCI_PRODUCT(pci_id)) {
|
||||
switch (BKTR_PCI_PRODUCT(pci_id)) {
|
||||
case PCI_PRODUCT_BROOKTREE_BT848:
|
||||
if (rev == 0x12)
|
||||
bktr->id = BROOKTREE_848A;
|
||||
|
@ -287,9 +287,9 @@ bktr_probe( device_t dev )
|
||||
unsigned int type = pci_get_devid(dev);
|
||||
unsigned int rev = pci_get_revid(dev);
|
||||
|
||||
if (PCI_VENDOR(type) == PCI_VENDOR_BROOKTREE)
|
||||
if (BKTR_PCI_VENDOR(type) == PCI_VENDOR_BROOKTREE)
|
||||
{
|
||||
switch (PCI_PRODUCT(type)) {
|
||||
switch (BKTR_PCI_PRODUCT(type)) {
|
||||
case PCI_PRODUCT_BROOKTREE_BT848:
|
||||
if (rev == 0x12)
|
||||
device_set_desc(dev, "BrookTree 848A");
|
||||
@ -922,11 +922,11 @@ bktr_probe(parent, match, aux)
|
||||
{
|
||||
struct pci_attach_args *pa = aux;
|
||||
|
||||
if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_BROOKTREE &&
|
||||
(PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT848 ||
|
||||
PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT849 ||
|
||||
PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT878 ||
|
||||
PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT879))
|
||||
if (BKTR_PCI_VENDOR(pa->pa_id) == PCI_VENDOR_BROOKTREE &&
|
||||
(BKTR_PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT848 ||
|
||||
BKTR_PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT849 ||
|
||||
BKTR_PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT878 ||
|
||||
BKTR_PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT879))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@ -88,15 +88,15 @@
|
||||
* Definitions for the Brooktree 848/878 video capture to pci interface.
|
||||
*/
|
||||
#ifndef __NetBSD__
|
||||
#define PCI_VENDOR_SHIFT 0
|
||||
#define PCI_VENDOR_MASK 0xffff
|
||||
#define PCI_VENDOR(id) \
|
||||
(((id) >> PCI_VENDOR_SHIFT) & PCI_VENDOR_MASK)
|
||||
#define BKTR_PCI_VENDOR_SHIFT 0
|
||||
#define BKTR_PCI_VENDOR_MASK 0xffff
|
||||
#define BKTR_PCI_VENDOR(id) \
|
||||
(((id) >> BKTR_PCI_VENDOR_SHIFT) & BKTR_PCI_VENDOR_MASK)
|
||||
|
||||
#define PCI_PRODUCT_SHIFT 16
|
||||
#define PCI_PRODUCT_MASK 0xffff
|
||||
#define PCI_PRODUCT(id) \
|
||||
(((id) >> PCI_PRODUCT_SHIFT) & PCI_PRODUCT_MASK)
|
||||
#define BKTR_PCI_PRODUCT_SHIFT 16
|
||||
#define BKTR_PCI_PRODUCT_MASK 0xffff
|
||||
#define BKTR_PCI_PRODUCT(id) \
|
||||
(((id) >> BKTR_PCI_PRODUCT_SHIFT) & BKTR_PCI_PRODUCT_MASK)
|
||||
|
||||
/* PCI vendor ID */
|
||||
#define PCI_VENDOR_BROOKTREE 0x109e /* Brooktree */
|
||||
|
Loading…
Reference in New Issue
Block a user