projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d56557a
)
pata_artop: Fix device ID parity check
author
Jean Delvare
<
[email protected]
>
Mon, 30 Aug 2010 15:37:05 +0000
(17:37 +0200)
committer
Jeff Garzik
<
[email protected]
>
Thu, 9 Sep 2010 18:19:18 +0000
(14:19 -0400)
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 <
[email protected]
>
Cc: Jeff Garzik <
[email protected]
>
Cc: Alan Cox <
[email protected]
>
Signed-off-by: Jeff Garzik <
[email protected]
>
drivers/ata/pata_artop.c
patch
|
blob
|
history
diff --git
a/drivers/ata/pata_artop.c
b/drivers/ata/pata_artop.c
index ba43f0f8c880a21aa1b8b1d3b9ae3d8c3487d415..2215632e4b317684a818b0ee5cbb7037fe064079 100644
(file)
--- 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);