diff options
author | James Bottomley <James.Bottomley@SteelEye.com> | 2007-05-09 05:33:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 15:30:49 -0400 |
commit | 809aa5048fb7e7fd3bf0aa1fb169c42db0f63b08 (patch) | |
tree | 11b46cfe54de960d7c5ea83c2ee31ee8222ad8b3 | |
parent | 818563dceccf695a71f8bd683a249e7bb09e3240 (diff) |
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 <James.Bottomley@SteelEye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/mca/mca-bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mca/mca-bus.c b/drivers/mca/mca-bus.c index da862e4632dd..a70fe00aea16 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) | |||
47 | { | 47 | { |
48 | struct mca_device *mca_dev = to_mca_device (dev); | 48 | struct mca_device *mca_dev = to_mca_device (dev); |
49 | struct mca_driver *mca_drv = to_mca_driver (drv); | 49 | struct mca_driver *mca_drv = to_mca_driver (drv); |
50 | const short *mca_ids = mca_drv->id_table; | 50 | const unsigned short *mca_ids = mca_drv->id_table; |
51 | int i; | 51 | int i; |
52 | 52 | ||
53 | if (!mca_ids) | 53 | if (!mca_ids) |