From patchwork Tue Jul 21 13:09:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 6835811 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5A5F09F380 for ; Tue, 21 Jul 2015 13:12:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8611520392 for ; Tue, 21 Jul 2015 13:12:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 79CC620573 for ; Tue, 21 Jul 2015 13:12:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752778AbbGUNMx (ORCPT ); Tue, 21 Jul 2015 09:12:53 -0400 Received: from mail-qg0-f42.google.com ([209.85.192.42]:34278 "EHLO mail-qg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752308AbbGUNMw (ORCPT ); Tue, 21 Jul 2015 09:12:52 -0400 Received: by qgeu79 with SMTP id u79so31444986qge.1 for ; Tue, 21 Jul 2015 06:12:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=C/oSDf5yL6Mfi/qEpr86t4dM/CGi3e5zHq7UeMYSFEY=; b=m4y9QYW0r7bnehOq/OAK3Y6m7xs6ubJ71Z4suqHRBw+9ywOc5RlFuS72T/mJlrT8iL RZ+P6YnX6t/AMweYV/ohZ3zQpyP5WKofu4P5mdf4IN4PQ6kfX18PRgt61c0EnBRoyBg1 zhxoxeGFexUq0OAjcfXr8MHgA39+K4DkWI1LXN8sWgvQzYA8NDoWDHXVsFk5ONUm6CD3 VY3/dJ35OG+9IXHCbZgvlZ8GWBhAMPp8TrAhZy/W2lwJKqJXK0WoWZBlq4YNmOOtYBQ6 TRsqAY+fCQxq/o0onTeph9SZkyRss5g/9tvbpyO6JY6NOwer5cOpvn5pNkuT3hyeIe6u D9YQ== X-Gm-Message-State: ALoCoQnzAAw12Vv4JIPxi25Vgc+jGrU5rPMepzi5dZnAlPds5femtwVnbYPcR5bND3PG6Y+eEBT9 X-Received: by 10.140.132.68 with SMTP id 65mr49703669qhe.6.1437484371545; Tue, 21 Jul 2015 06:12:51 -0700 (PDT) Received: from localhost.localdomain ([190.2.108.156]) by smtp.gmail.com with ESMTPSA id 143sm12629285qhw.21.2015.07.21.06.12.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Jul 2015 06:12:50 -0700 (PDT) From: Ezequiel Garcia To: , Hans Verkuil Cc: Ezequiel Garcia Subject: [PATCH v2] tw68: Move PCI vendor and device IDs to pci_ids.h Date: Tue, 21 Jul 2015 10:09:10 -0300 Message-Id: <1437484150-3751-1-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.4.6 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commits moves the Intersil/Techwell PCI vendor ID, and the device IDs for the TW68 PCI video capture cards. This will allow to support future Intersil/Techwell devices without duplicating the IDs. Signed-off-by: Ezequiel Garcia --- v2: * Fixed three additional uses of the defines I missed on v1. drivers/media/pci/tw68/tw68-core.c | 21 +++++++++++---------- drivers/media/pci/tw68/tw68.h | 16 ---------------- include/linux/pci_ids.h | 9 +++++++++ 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/drivers/media/pci/tw68/tw68-core.c b/drivers/media/pci/tw68/tw68-core.c index c135165..04706cc 100644 --- a/drivers/media/pci/tw68/tw68-core.c +++ b/drivers/media/pci/tw68/tw68-core.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -70,13 +71,13 @@ static atomic_t tw68_instance = ATOMIC_INIT(0); * added under vendor 0x1797 (Techwell Inc.) as subsystem IDs. */ static const struct pci_device_id tw68_pci_tbl[] = { - {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6800)}, - {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6801)}, - {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6804)}, - {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6816_1)}, - {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6816_2)}, - {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6816_3)}, - {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6816_4)}, + {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_TECHWELL_6800)}, + {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_TECHWELL_6801)}, + {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_TECHWELL_6804)}, + {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_TECHWELL_6816_1)}, + {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_TECHWELL_6816_2)}, + {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_TECHWELL_6816_3)}, + {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_TECHWELL_6816_4)}, {0,} }; @@ -263,15 +264,15 @@ static int tw68_initdev(struct pci_dev *pci_dev, } switch (pci_id->device) { - case PCI_DEVICE_ID_6800: /* TW6800 */ + case PCI_DEVICE_ID_TECHWELL_6800: /* TW6800 */ dev->vdecoder = TW6800; dev->board_virqmask = TW68_VID_INTS; break; - case PCI_DEVICE_ID_6801: /* Video decoder for TW6802 */ + case PCI_DEVICE_ID_TECHWELL_6801: /* Video decoder for TW6802 */ dev->vdecoder = TW6801; dev->board_virqmask = TW68_VID_INTS | TW68_VID_INTSX; break; - case PCI_DEVICE_ID_6804: /* Video decoder for TW6804 */ + case PCI_DEVICE_ID_TECHWELL_6804: /* Video decoder for TW6804 */ dev->vdecoder = TW6804; dev->board_virqmask = TW68_VID_INTS | TW68_VID_INTSX; break; diff --git a/drivers/media/pci/tw68/tw68.h b/drivers/media/pci/tw68/tw68.h index 93f2335..ef51e4d 100644 --- a/drivers/media/pci/tw68/tw68.h +++ b/drivers/media/pci/tw68/tw68.h @@ -42,22 +42,6 @@ #define UNSET (-1U) -/* system vendor and device ID's */ -#define PCI_VENDOR_ID_TECHWELL 0x1797 -#define PCI_DEVICE_ID_6800 0x6800 -#define PCI_DEVICE_ID_6801 0x6801 -#define PCI_DEVICE_ID_AUDIO2 0x6802 -#define PCI_DEVICE_ID_TS3 0x6803 -#define PCI_DEVICE_ID_6804 0x6804 -#define PCI_DEVICE_ID_AUDIO5 0x6805 -#define PCI_DEVICE_ID_TS6 0x6806 - -/* tw6816 based cards */ -#define PCI_DEVICE_ID_6816_1 0x6810 -#define PCI_DEVICE_ID_6816_2 0x6811 -#define PCI_DEVICE_ID_6816_3 0x6812 -#define PCI_DEVICE_ID_6816_4 0x6813 - #define TW68_NORMS ( \ V4L2_STD_NTSC | V4L2_STD_PAL | V4L2_STD_SECAM | \ V4L2_STD_PAL_M | V4L2_STD_PAL_Nc | V4L2_STD_PAL_60) diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index fcff8f8..d9ba49c 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2332,6 +2332,15 @@ #define PCI_VENDOR_ID_CAVIUM 0x177d +#define PCI_VENDOR_ID_TECHWELL 0x1797 +#define PCI_DEVICE_ID_TECHWELL_6800 0x6800 +#define PCI_DEVICE_ID_TECHWELL_6801 0x6801 +#define PCI_DEVICE_ID_TECHWELL_6804 0x6804 +#define PCI_DEVICE_ID_TECHWELL_6816_1 0x6810 +#define PCI_DEVICE_ID_TECHWELL_6816_2 0x6811 +#define PCI_DEVICE_ID_TECHWELL_6816_3 0x6812 +#define PCI_DEVICE_ID_TECHWELL_6816_4 0x6813 + #define PCI_VENDOR_ID_BELKIN 0x1799 #define PCI_DEVICE_ID_BELKIN_F5D7010V7 0x701f