From: James Bottomley Date: Sat, 11 Aug 2007 22:03:39 +0000 (+0200) Subject: [MCA] fix bus matching X-Git-Tag: v2.6.16.54-rc1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b53bff31b95ef18d7568b805d459eb28b32767ee;p=thirdparty%2Fkernel%2Fstable.git [MCA] fix bus matching 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 Signed-off-by: Adrian Bunk --- diff --git a/drivers/mca/mca-bus.c b/drivers/mca/mca-bus.c index 09baa43b25997..bcbffe51b81c4 100644 --- a/drivers/mca/mca-bus.c +++ b/drivers/mca/mca-bus.c @@ -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)