* [PATCH] pcm551.c: use pci_ids.h defines
@ 2010-05-21 23:24 ` H Hartley Sweeten
0 siblings, 0 replies; 6+ messages in thread
From: H Hartley Sweeten @ 2010-05-21 23:24 UTC (permalink / raw)
To: linux-kernel, linux-mtd, linux-pci; +Cc: David Woodhouse, jbarnes
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2075 bytes --]
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>
---
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
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] pcm551.c: use pci_ids.h defines
@ 2010-05-21 23:24 ` H Hartley Sweeten
0 siblings, 0 replies; 6+ messages in thread
From: H Hartley Sweeten @ 2010-05-21 23:24 UTC (permalink / raw)
To: linux-kernel, linux-mtd, linux-pci; +Cc: David Woodhouse, jbarnes
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>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] pcm551.c: use pci_ids.h defines
2010-05-21 23:24 ` H Hartley Sweeten
@ 2010-05-21 23:42 ` Greg KH
-1 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2010-05-21 23:42 UTC (permalink / raw)
To: H Hartley Sweeten
Cc: linux-kernel, linux-mtd, linux-pci, David Woodhouse, jbarnes
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] pcm551.c: use pci_ids.h defines
@ 2010-05-21 23:42 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2010-05-21 23:42 UTC (permalink / raw)
To: H Hartley Sweeten
Cc: linux-pci, David Woodhouse, linux-mtd, linux-kernel, jbarnes
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] pcm551.c: use pci_ids.h defines
2010-05-21 23:42 ` Greg KH
@ 2010-05-21 23:46 ` H Hartley Sweeten
-1 siblings, 0 replies; 6+ messages in thread
From: H Hartley Sweeten @ 2010-05-21 23:46 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, linux-mtd, linux-pci, David Woodhouse, jbarnes
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] pcm551.c: use pci_ids.h defines
@ 2010-05-21 23:46 ` H Hartley Sweeten
0 siblings, 0 replies; 6+ messages in thread
From: H Hartley Sweeten @ 2010-05-21 23:46 UTC (permalink / raw)
To: Greg KH; +Cc: linux-pci, David Woodhouse, linux-mtd, linux-kernel, jbarnes
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-21 23:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-21 23:24 [PATCH] pcm551.c: use pci_ids.h defines H Hartley Sweeten
2010-05-21 23:24 ` H Hartley Sweeten
2010-05-21 23:42 ` Greg KH
2010-05-21 23:42 ` Greg KH
2010-05-21 23:46 ` H Hartley Sweeten
2010-05-21 23:46 ` H Hartley Sweeten
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.