diff options
author | Jean Delvare <jdelvare@suse.de> | 2010-08-30 17:37:05 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-09-09 14:19:18 -0400 |
commit | 673424c0890a00e22398017c9adf999577526220 (patch) | |
tree | 8c6744075b71624f03c409e0cfb1c15f51951f4c | |
parent | d56557af19867edb8c0e96f8e26399698a08857f (diff) | |
download | op-kernel-dev-673424c0890a00e22398017c9adf999577526220.zip op-kernel-dev-673424c0890a00e22398017c9adf999577526220.tar.gz |
pata_artop: Fix device ID parity check
x % 1 always evaluates to 0, which clearly isn't the intent. The
author probably had "% 2" or "& 1" in mind, and mispelled it.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r-- | drivers/ata/pata_artop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index ba43f0f..2215632 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c @@ -74,7 +74,8 @@ static int artop6260_pre_reset(struct ata_link *link, unsigned long deadline) struct pci_dev *pdev = to_pci_dev(ap->host->dev); /* Odd numbered device ids are the units with enable bits (the -R cards) */ - if (pdev->device % 1 && !pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no])) + if ((pdev->device & 1) && + !pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no])) return -ENOENT; return ata_sff_prereset(link, deadline); |