From: Jean Delvare Date: Mon, 30 Aug 2010 15:37:05 +0000 (+0200) Subject: pata_artop: Fix device ID parity check X-Git-Tag: v2.6.36-rc4~22^2~6 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=673424c0890a00e22398017c9adf999577526220;p=~shefty%2Frdma-dev.git 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 Cc: Jeff Garzik Cc: Alan Cox Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index ba43f0f8c88..2215632e4b3 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);