mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
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 <[email protected]> Cc: Jeff Garzik <[email protected]> Cc: Alan Cox <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
This commit is contained in:
parent
d56557af19
commit
673424c089
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue