]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[MCA] fix bus matching
authorJames Bottomley <James.Bottomley@SteelEye.com>
Sat, 11 Aug 2007 22:03:39 +0000 (00:03 +0200)
committerAdrian Bunk <bunk@stusta.de>
Sat, 11 Aug 2007 22:03:39 +0000 (00:03 +0200)
There's a bug in the MCA bus matching algorithm in that it promotes from
signed short to int before comparing with the actual id and does sign
extension on anything > 0x7fff (which means that pos ids > 0x7fff never
get correctly matched).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
drivers/mca/mca-bus.c

index 09baa43b259975f05c3a28fe0e5f17a551418537..bcbffe51b81c464b48f132947b4addf7c425f43d 100644 (file)
@@ -47,7 +47,7 @@ static int mca_bus_match (struct device *dev, struct device_driver *drv)
 {
        struct mca_device *mca_dev = to_mca_device (dev);
        struct mca_driver *mca_drv = to_mca_driver (drv);
-       const short *mca_ids = mca_drv->id_table;
+       const unsigned short *mca_ids = mca_drv->id_table;
        int i;
 
        if (!mca_ids)