diff mbox

pata_artop: use defines from pci.h

Message ID 1335650229-5930-1-git-send-email-vapier@gentoo.org
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Mike Frysinger April 28, 2012, 9:57 p.m. UTC
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/ata/pata_artop.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Jeff Garzik April 28, 2012, 11:46 p.m. UTC | #1
On 04/28/2012 05:57 PM, Mike Frysinger wrote:
> Signed-off-by: Mike Frysinger<vapier@gentoo.org>
> ---
>   drivers/ata/pata_artop.c |   10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
> index 4b8b22e..553a3b3 100644
> --- a/drivers/ata/pata_artop.c
> +++ b/drivers/ata/pata_artop.c
> @@ -414,11 +414,11 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
>   }
>
>   static const struct pci_device_id artop_pci_tbl[] = {
> -	{ PCI_VDEVICE(ARTOP, 0x0005), 0 },
> -	{ PCI_VDEVICE(ARTOP, 0x0006), 1 },
> -	{ PCI_VDEVICE(ARTOP, 0x0007), 1 },
> -	{ PCI_VDEVICE(ARTOP, 0x0008), 2 },
> -	{ PCI_VDEVICE(ARTOP, 0x0009), 2 },
> +	{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF), 0 },
> +	{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP860),   1 },
> +	{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R),  1 },
> +	{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP865),   2 },
> +	{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R),  2 },

This is going in the reverse direction of where we want to go.  The 
device IDs are largely arbitrary even at the vendor level, and these PCI 
symbols are often only used in a single location (the driver itself).

Better to delete these PCI_DEVICE_ID_ARTOP_xxx symbols instead.

	Jeff




--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index 4b8b22e..553a3b3 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -414,11 +414,11 @@  static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
 }
 
 static const struct pci_device_id artop_pci_tbl[] = {
-	{ PCI_VDEVICE(ARTOP, 0x0005), 0 },
-	{ PCI_VDEVICE(ARTOP, 0x0006), 1 },
-	{ PCI_VDEVICE(ARTOP, 0x0007), 1 },
-	{ PCI_VDEVICE(ARTOP, 0x0008), 2 },
-	{ PCI_VDEVICE(ARTOP, 0x0009), 2 },
+	{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF), 0 },
+	{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP860),   1 },
+	{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R),  1 },
+	{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP865),   2 },
+	{ PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R),  2 },
 
 	{ }	/* terminate list */
 };