Patchwork pcm551.c: use pci_ids.h defines

login
register
mail settings
Submitter hartleys
Date May 21, 2010, 11:24 p.m.
Message ID <0D753D10438DA54287A00B0270842697636F3238A0@AUSP01VMBX24.collaborationhost.net>
Download mbox | patch
Permalink /patch/53229/
State New
Headers show

Comments

hartleys - May 21, 2010, 11:24 p.m.
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@visionengravers.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

---
Greg KH - May 21, 2010, 11:42 p.m.
On Fri, May 21, 2010 at 06:24:01PM -0500, H Hartley Sweeten wrote:
> 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.

Did you read the comment at the top of the pci_ids.h file saying not to
do this?  Just use the vendor id that is already in the pci_ids.h file
in the driver, but leave the device id in the driver itself.

thanks,

greg k-h
hartleys - May 21, 2010, 11:46 p.m.
On Friday, May 21, 2010 4:43 PM, Greg KH wrote:
> On Fri, May 21, 2010 at 06:24:01PM -0500, H Hartley Sweeten wrote:
>> 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.
>
> Did you read the comment at the top of the pci_ids.h file saying not to
> do this?  Just use the vendor id that is already in the pci_ids.h file
> in the driver, but leave the device id in the driver itself.

Oops.. My bad, sorry.

Please ignore this patch (and the other two).

Regards,
Hartley

Patch

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