aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-07-01 21:55:03 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-01 23:11:56 -0400
commitd63fb6c55f5f9eb3032fc5c3ab6eb9a26dd67cdc (patch)
tree8e2d3ff8deef62cf64f3989d5f6804feaa3753fe /drivers
parentfc25465f09414538afdbceacc517dd4dbabadeca (diff)
[PATCH] powermac: Fix some 64b resource damage
The 64 bits resource patches did a bit of damage on PowerMac causing a buffer overflow in macio_asic and a warning in a sound driver. The former is fixed by reverting the sprintf of the bus_id to %08x as it was before. The bus_id used for macio devices is always a 32 bits value (macio always sits in 32 bits space) and since it's exposed to userland, the format of the string shouldn't be changed like that anyway. The second by using the proper type for printk. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/macintosh/macio_asic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index d832e109b1b1..40ae7b6a939d 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -427,10 +427,10 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
427 427
428 /* MacIO itself has a different reg, we use it's PCI base */ 428 /* MacIO itself has a different reg, we use it's PCI base */
429 if (np == chip->of_node) { 429 if (np == chip->of_node) {
430 sprintf(dev->ofdev.dev.bus_id, "%1d.%016llx:%.*s", 430 sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s",
431 chip->lbus.index, 431 chip->lbus.index,
432#ifdef CONFIG_PCI 432#ifdef CONFIG_PCI
433 (unsigned long long)pci_resource_start(chip->lbus.pdev, 0), 433 (unsigned int)pci_resource_start(chip->lbus.pdev, 0),
434#else 434#else
435 0, /* NuBus may want to do something better here */ 435 0, /* NuBus may want to do something better here */
436#endif 436#endif