]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] smc91x addr config check
authorNicolas Pitre <nico@cam.org>
Fri, 13 May 2005 00:18:19 +0000 (20:18 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Fri, 13 May 2005 00:18:19 +0000 (20:18 -0400)
  The PAGE_SIZE mask is indeed confusing.  Use the exact mask for
  this context which has nothing to do with memory pages at all.
  Also cast to int since the value to compare with is an int.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/smc91x.c

index 5e561ba4433330ee2e49675f2805f3e03457715d..1e2b860dab23d0ee6cb9984b950179bf7549d023 100644 (file)
@@ -1863,7 +1863,7 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr)
        SMC_SELECT_BANK(1);
        val = SMC_GET_BASE();
        val = ((val & 0x1F00) >> 3) << SMC_IO_SHIFT;
-       if (((unsigned long)ioaddr & ((PAGE_SIZE-1)<<SMC_IO_SHIFT)) != val) { /*XXX: WTF? */
+       if (((unsigned int)ioaddr & (0x3e0 << SMC_IO_SHIFT)) != val) {
                printk("%s: IOADDR %p doesn't match configuration (%x).\n",
                        CARDNAME, ioaddr, val);
        }