lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 21 May 2010 18:24:01 -0500
From:	H Hartley Sweeten <hartleys@...ionengravers.com>
To:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-mtd <linux-mtd@...ts.infradead.org>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>
CC:	David Woodhouse <dwmw2@...radead.org>,
	"jbarnes@...tuousgeek.org" <jbarnes@...tuousgeek.org>
Subject: [PATCH] pcm551.c: use pci_ids.h defines

Move the DEVICE id to pci_ids.h and then use the VENDOR/DEVICE ids provided
in pci_ids.h instead of creating local ids.

Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
Cc: David Woodhouse <dwmw2@...radead.org>
Cc: Jesse Barnes <jbarnes@...tuousgeek.org>

---

diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
index fc8ea0a..f648e2b 100644
--- a/drivers/mtd/devices/pmc551.c
+++ b/drivers/mtd/devices/pmc551.c
@@ -697,8 +697,8 @@ static int __init init_pmc551(void)
 	 */
 	for (;;) {
 
-		if ((PCI_Device = pci_get_device(PCI_VENDOR_ID_V3_SEMI,
-						  PCI_DEVICE_ID_V3_SEMI_V370PDC,
+		if ((PCI_Device = pci_get_device(PCI_VENDOR_ID_V3,
+						  PCI_DEVICE_ID_V3_V370PDC,
 						  PCI_Device)) == NULL) {
 			break;
 		}
diff --git a/include/linux/mtd/pmc551.h b/include/linux/mtd/pmc551.h
index 27ad40a..bc68a9d 100644
--- a/include/linux/mtd/pmc551.h
+++ b/include/linux/mtd/pmc551.h
@@ -41,18 +41,6 @@ static int pmc551_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *);
 static int pmc551_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
 
 
-/*
- * Define the PCI ID's if the kernel doesn't define them for us
- */
-#ifndef PCI_VENDOR_ID_V3_SEMI
-#define PCI_VENDOR_ID_V3_SEMI             0x11b0
-#endif
-
-#ifndef PCI_DEVICE_ID_V3_SEMI_V370PDC
-#define PCI_DEVICE_ID_V3_SEMI_V370PDC     0x0200
-#endif
-
-
 #define PMC551_PCI_MEM_MAP0	0x50
 #define PMC551_PCI_MEM_MAP1	0x54
 #define PMC551_PCI_MEM_MAP_MAP_ADDR_MASK	0x3ff00000
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 9f688d2..3987d96 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1565,6 +1565,7 @@
 #define PCI_VENDOR_ID_V3		0x11b0
 #define PCI_DEVICE_ID_V3_V960		0x0001
 #define PCI_DEVICE_ID_V3_V351		0x0002
+#define PCI_DEVICE_ID_V3_V370PDC	0x0200
 
 #define PCI_VENDOR_ID_ATT		0x11c1
 #define PCI_DEVICE_ID_ATT_VENUS_MODEM	0x480

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ