From owner-svn-src-all@freebsd.org Sun Jun 24 19:01:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7C5B1009BC5; Sun, 24 Jun 2018 19:01:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95B2E72DBA; Sun, 24 Jun 2018 19:01:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76EF222998; Sun, 24 Jun 2018 19:01:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5OJ12di006668; Sun, 24 Jun 2018 19:01:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5OJ111d006664; Sun, 24 Jun 2018 19:01:01 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806241901.w5OJ111d006664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 24 Jun 2018 19:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335606 - head/sys/dev/bktr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/bktr X-SVN-Commit-Revision: 335606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2018 19:01:03 -0000 Author: imp Date: Sun Jun 24 19:01:01 2018 New Revision: 335606 URL: https://svnweb.freebsd.org/changeset/base/335606 Log: Don't use generic PCI_VENDOR and PCI_PRODUCT macros. Prefix them with BKTR_ to avoid possible conflicts. Modified: head/sys/dev/bktr/bktr_core.c head/sys/dev/bktr/bktr_os.c head/sys/dev/bktr/bktr_reg.h Modified: head/sys/dev/bktr/bktr_core.c ============================================================================== --- head/sys/dev/bktr/bktr_core.c Sun Jun 24 18:57:06 2018 (r335605) +++ head/sys/dev/bktr/bktr_core.c Sun Jun 24 19:01:01 2018 (r335606) @@ -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; Modified: head/sys/dev/bktr/bktr_os.c ============================================================================== --- head/sys/dev/bktr/bktr_os.c Sun Jun 24 18:57:06 2018 (r335605) +++ head/sys/dev/bktr/bktr_os.c Sun Jun 24 19:01:01 2018 (r335606) @@ -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; Modified: head/sys/dev/bktr/bktr_reg.h ============================================================================== --- head/sys/dev/bktr/bktr_reg.h Sun Jun 24 18:57:06 2018 (r335605) +++ head/sys/dev/bktr/bktr_reg.h Sun Jun 24 19:01:01 2018 (r335606) @@ -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 */