summaryrefslogtreecommitdiff
path: root/sound/sparc/amd7930.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/sparc/amd7930.c')
-rw-r--r--sound/sparc/amd7930.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index 0fea04acc3ea..e73d3b262f57 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -39,6 +39,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/io.h>
+#include <linux/string.h>
#include <sound/core.h>
#include <sound/pcm.h>
@@ -754,7 +755,7 @@ static int snd_amd7930_pcm(struct snd_amd7930 *amd)
pcm->private_data = amd;
pcm->info_flags = 0;
- strcpy(pcm->name, amd->card->shortname);
+ strscpy(pcm->name, amd->card->shortname);
amd->pcm = pcm;
snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
@@ -874,7 +875,7 @@ static int snd_amd7930_mixer(struct snd_amd7930 *amd)
return -EINVAL;
card = amd->card;
- strcpy(card->mixername, card->shortname);
+ strscpy(card->mixername, card->shortname);
for (idx = 0; idx < ARRAY_SIZE(amd7930_controls); idx++) {
if ((err = snd_ctl_add(card,
@@ -935,8 +936,8 @@ static int snd_amd7930_create(struct snd_card *card,
amd->regs = of_ioremap(&op->resource[0], 0,
resource_size(&op->resource[0]), "amd7930");
if (!amd->regs) {
- snd_printk(KERN_ERR
- "amd7930-%d: Unable to map chip registers.\n", dev);
+ dev_err(card->dev,
+ "amd7930-%d: Unable to map chip registers.\n", dev);
kfree(amd);
return -EIO;
}
@@ -945,8 +946,8 @@ static int snd_amd7930_create(struct snd_card *card,
if (request_irq(irq, snd_amd7930_interrupt,
IRQF_SHARED, "amd7930", amd)) {
- snd_printk(KERN_ERR "amd7930-%d: Unable to grab IRQ %d\n",
- dev, irq);
+ dev_err(card->dev, "amd7930-%d: Unable to grab IRQ %d\n",
+ dev, irq);
snd_amd7930_free(amd);
return -EBUSY;
}
@@ -1007,8 +1008,8 @@ static int amd7930_sbus_probe(struct platform_device *op)
if (err < 0)
return err;
- strcpy(card->driver, "AMD7930");
- strcpy(card->shortname, "Sun AMD7930");
+ strscpy(card->driver, "AMD7930");
+ strscpy(card->shortname, "Sun AMD7930");
sprintf(card->longname, "%s at 0x%02lx:0x%08Lx, irq %d",
card->shortname,
rp->flags & 0xffL,