Commit aa0a2ddc authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] 64bit resource: fix up printks for resources in sound drivers

This is needed if we wish to change the size of the resource structures.

Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 740e518e
...@@ -779,8 +779,9 @@ static struct aaci * __devinit aaci_init_card(struct amba_device *dev) ...@@ -779,8 +779,9 @@ static struct aaci * __devinit aaci_init_card(struct amba_device *dev)
strlcpy(card->driver, DRIVER_NAME, sizeof(card->driver)); strlcpy(card->driver, DRIVER_NAME, sizeof(card->driver));
strlcpy(card->shortname, "ARM AC'97 Interface", sizeof(card->shortname)); strlcpy(card->shortname, "ARM AC'97 Interface", sizeof(card->shortname));
snprintf(card->longname, sizeof(card->longname), snprintf(card->longname, sizeof(card->longname),
"%s at 0x%08lx, irq %d", "%s at 0x%016llx, irq %d",
card->shortname, dev->res.start, dev->irq[0]); card->shortname, (unsigned long long)dev->res.start,
dev->irq[0]);
aaci = card->private_data; aaci = card->private_data;
mutex_init(&aaci->ac97_sem); mutex_init(&aaci->ac97_sem);
......
...@@ -160,8 +160,9 @@ static int __devinit snd_mpu401_pnp(int dev, struct pnp_dev *device, ...@@ -160,8 +160,9 @@ static int __devinit snd_mpu401_pnp(int dev, struct pnp_dev *device,
return -ENODEV; return -ENODEV;
} }
if (pnp_port_len(device, 0) < IO_EXTENT) { if (pnp_port_len(device, 0) < IO_EXTENT) {
snd_printk(KERN_ERR "PnP port length is %ld, expected %d\n", snd_printk(KERN_ERR "PnP port length is %llu, expected %d\n",
pnp_port_len(device, 0), IO_EXTENT); (unsigned long long)pnp_port_len(device, 0),
IO_EXTENT);
return -ENODEV; return -ENODEV;
} }
port[dev] = pnp_port_start(device, 0); port[dev] = pnp_port_start(device, 0);
......
...@@ -2088,7 +2088,8 @@ static int __devinit snd_audiodrive_pnp(int dev, struct snd_audiodrive *acard, ...@@ -2088,7 +2088,8 @@ static int __devinit snd_audiodrive_pnp(int dev, struct snd_audiodrive *acard,
kfree(cfg); kfree(cfg);
return -EAGAIN; return -EAGAIN;
} }
snd_printdd("pnp: port=0x%lx\n", pnp_port_start(acard->devc, 0)); snd_printdd("pnp: port=0x%llx\n",
(unsigned long long)pnp_port_start(acard->devc, 0));
/* PnP initialization */ /* PnP initialization */
pdev = acard->dev; pdev = acard->dev;
pnp_init_resource_table(cfg); pnp_init_resource_table(cfg);
......
...@@ -611,10 +611,10 @@ static int __devinit snd_interwave_pnp(int dev, struct snd_interwave *iwcard, ...@@ -611,10 +611,10 @@ static int __devinit snd_interwave_pnp(int dev, struct snd_interwave *iwcard,
if (dma2[dev] >= 0) if (dma2[dev] >= 0)
dma2[dev] = pnp_dma(pdev, 1); dma2[dev] = pnp_dma(pdev, 1);
irq[dev] = pnp_irq(pdev, 0); irq[dev] = pnp_irq(pdev, 0);
snd_printdd("isapnp IW: sb port=0x%lx, gf1 port=0x%lx, codec port=0x%lx\n", snd_printdd("isapnp IW: sb port=0x%llx, gf1 port=0x%llx, codec port=0x%llx\n",
pnp_port_start(pdev, 0), (unsigned long long)pnp_port_start(pdev, 0),
pnp_port_start(pdev, 1), (unsigned long long)pnp_port_start(pdev, 1),
pnp_port_start(pdev, 2)); (unsigned long long)pnp_port_start(pdev, 2));
snd_printdd("isapnp IW: dma1=%i, dma2=%i, irq=%i\n", dma1[dev], dma2[dev], irq[dev]); snd_printdd("isapnp IW: dma1=%i, dma2=%i, irq=%i\n", dma1[dev], dma2[dev], irq[dev]);
#ifdef SNDRV_STB #ifdef SNDRV_STB
/* Tone Control initialization */ /* Tone Control initialization */
......
...@@ -327,7 +327,8 @@ static int __devinit snd_card_sb16_pnp(int dev, struct snd_card_sb16 *acard, ...@@ -327,7 +327,8 @@ static int __devinit snd_card_sb16_pnp(int dev, struct snd_card_sb16 *acard,
goto __wt_error; goto __wt_error;
} }
awe_port[dev] = pnp_port_start(pdev, 0); awe_port[dev] = pnp_port_start(pdev, 0);
snd_printdd("pnp SB16: wavetable port=0x%lx\n", pnp_port_start(pdev, 0)); snd_printdd("pnp SB16: wavetable port=0x%llx\n",
(unsigned long long)pnp_port_start(pdev, 0));
} else { } else {
__wt_error: __wt_error:
if (pdev) { if (pdev) {
......
...@@ -2035,8 +2035,9 @@ forte_probe (struct pci_dev *pci_dev, const struct pci_device_id *pci_id) ...@@ -2035,8 +2035,9 @@ forte_probe (struct pci_dev *pci_dev, const struct pci_device_id *pci_id)
pci_set_drvdata (pci_dev, chip); pci_set_drvdata (pci_dev, chip);
printk (KERN_INFO PFX "FM801 chip found at 0x%04lX-0x%04lX IRQ %u\n", printk (KERN_INFO PFX "FM801 chip found at 0x%04lX-0x%16llX IRQ %u\n",
chip->iobase, pci_resource_end (pci_dev, 0), chip->irq); chip->iobase, (unsigned long long)pci_resource_end (pci_dev, 0),
chip->irq);
/* Power it up */ /* Power it up */
if ((ret = forte_chip_init (chip)) == 0) if ((ret = forte_chip_init (chip)) == 0)
......
...@@ -888,8 +888,9 @@ static int __devinit snd_bt87x_probe(struct pci_dev *pci, ...@@ -888,8 +888,9 @@ static int __devinit snd_bt87x_probe(struct pci_dev *pci,
strcpy(card->driver, "Bt87x"); strcpy(card->driver, "Bt87x");
sprintf(card->shortname, "Brooktree Bt%x", pci->device); sprintf(card->shortname, "Brooktree Bt%x", pci->device);
sprintf(card->longname, "%s at %#lx, irq %i", sprintf(card->longname, "%s at %#llx, irq %i",
card->shortname, pci_resource_start(pci, 0), chip->irq); card->shortname, (unsigned long long)pci_resource_start(pci, 0),
chip->irq);
strcpy(card->mixername, "Bt87x"); strcpy(card->mixername, "Bt87x");
err = snd_card_register(card); err = snd_card_register(card);
......
...@@ -1441,10 +1441,10 @@ static int __devinit snd_sonic_probe(struct pci_dev *pci, ...@@ -1441,10 +1441,10 @@ static int __devinit snd_sonic_probe(struct pci_dev *pci,
strcpy(card->driver, "SonicVibes"); strcpy(card->driver, "SonicVibes");
strcpy(card->shortname, "S3 SonicVibes"); strcpy(card->shortname, "S3 SonicVibes");
sprintf(card->longname, "%s rev %i at 0x%lx, irq %i", sprintf(card->longname, "%s rev %i at 0x%llx, irq %i",
card->shortname, card->shortname,
sonic->revision, sonic->revision,
pci_resource_start(pci, 1), (unsigned long long)pci_resource_start(pci, 1),
sonic->irq); sonic->irq);
if ((err = snd_sonicvibes_pcm(sonic, 0, NULL)) < 0) { if ((err = snd_sonicvibes_pcm(sonic, 0, NULL)) < 0) {
......
...@@ -1170,9 +1170,10 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) ...@@ -1170,9 +1170,10 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
chip->rsrc[i].start + 1, chip->rsrc[i].start + 1,
rnames[i]) == NULL) { rnames[i]) == NULL) {
printk(KERN_ERR "snd: can't request rsrc " printk(KERN_ERR "snd: can't request rsrc "
" %d (%s: 0x%08lx:%08lx)\n", " %d (%s: 0x%016lx:%016lx)\n",
i, rnames[i], chip->rsrc[i].start, i, rnames[i],
chip->rsrc[i].end); (unsigned long long)chip->rsrc[i].start,
(unsigned long long)chip->rsrc[i].end);
err = -ENODEV; err = -ENODEV;
goto __error; goto __error;
} }
...@@ -1201,9 +1202,10 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) ...@@ -1201,9 +1202,10 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
chip->rsrc[i].start + 1, chip->rsrc[i].start + 1,
rnames[i]) == NULL) { rnames[i]) == NULL) {
printk(KERN_ERR "snd: can't request rsrc " printk(KERN_ERR "snd: can't request rsrc "
" %d (%s: 0x%08lx:%08lx)\n", " %d (%s: 0x%016llx:%016llx)\n",
i, rnames[i], chip->rsrc[i].start, i, rnames[i],
chip->rsrc[i].end); (unsigned long long)chip->rsrc[i].start,
(unsigned long long)chip->rsrc[i].end);
err = -ENODEV; err = -ENODEV;
goto __error; goto __error;
} }
......
...@@ -2037,10 +2037,10 @@ static int __init cs4231_sbus_attach(struct sbus_dev *sdev) ...@@ -2037,10 +2037,10 @@ static int __init cs4231_sbus_attach(struct sbus_dev *sdev)
if (err) if (err)
return err; return err;
sprintf(card->longname, "%s at 0x%02lx:0x%08lx, irq %d", sprintf(card->longname, "%s at 0x%02lx:0x%016lx, irq %d",
card->shortname, card->shortname,
rp->flags & 0xffL, rp->flags & 0xffL,
rp->start, (unsigned long long)rp->start,
sdev->irqs[0]); sdev->irqs[0]);
if ((err = snd_cs4231_sbus_create(card, sdev, dev, &cp)) < 0) { if ((err = snd_cs4231_sbus_create(card, sdev, dev, &cp)) < 0) {
......
...@@ -2645,9 +2645,9 @@ static int __init dbri_attach(int prom_node, struct sbus_dev *sdev) ...@@ -2645,9 +2645,9 @@ static int __init dbri_attach(int prom_node, struct sbus_dev *sdev)
strcpy(card->driver, "DBRI"); strcpy(card->driver, "DBRI");
strcpy(card->shortname, "Sun DBRI"); strcpy(card->shortname, "Sun DBRI");
rp = &sdev->resource[0]; rp = &sdev->resource[0];
sprintf(card->longname, "%s at 0x%02lx:0x%08lx, irq %d", sprintf(card->longname, "%s at 0x%02lx:0x%016lx, irq %d",
card->shortname, card->shortname,
rp->flags & 0xffL, rp->start, irq.pri); rp->flags & 0xffL, (unsigned long long)rp->start, irq.pri);
if ((err = snd_dbri_create(card, sdev, &irq, dev)) < 0) { if ((err = snd_dbri_create(card, sdev, &irq, dev)) < 0) {
snd_card_free(card); snd_card_free(card);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment