diff options
Diffstat (limited to 'sound/sparc')
-rw-r--r-- | sound/sparc/amd7930.c | 9 | ||||
-rw-r--r-- | sound/sparc/cs4231.c | 14 | ||||
-rw-r--r-- | sound/sparc/dbri.c | 9 |
3 files changed, 17 insertions, 15 deletions
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c index 9bdf3db51d62..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, @@ -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, diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 1b44119edfbc..1a1fe3ceb76c 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c @@ -1230,7 +1230,7 @@ static int snd_cs4231_pcm(struct snd_card *card) /* global setup */ pcm->private_data = chip; pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX; - strcpy(pcm->name, "CS4231"); + strscpy(pcm->name, "CS4231"); snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, &chip->op->dev, 64 * 1024, 128 * 1024); @@ -1256,7 +1256,7 @@ static int snd_cs4231_timer(struct snd_card *card) err = snd_timer_new(card, "CS4231", &tid, &timer); if (err < 0) return err; - strcpy(timer->name, "CS4231"); + strscpy(timer->name, "CS4231"); timer->private_data = chip; timer->hw = snd_cs4231_timer_table; chip->timer = timer; @@ -1530,7 +1530,7 @@ static int snd_cs4231_mixer(struct snd_card *card) if (snd_BUG_ON(!chip || !chip->pcm)) return -EINVAL; - strcpy(card->mixername, chip->pcm->name); + strscpy(card->mixername, chip->pcm->name); for (idx = 0; idx < ARRAY_SIZE(snd_cs4231_controls); idx++) { err = snd_ctl_add(card, @@ -1565,8 +1565,8 @@ static int cs4231_attach_begin(struct platform_device *op, if (err < 0) return err; - strcpy(card->driver, "CS4231"); - strcpy(card->shortname, "Sun CS4231"); + strscpy(card->driver, "CS4231"); + strscpy(card->shortname, "Sun CS4231"); chip = card->private_data; chip->card = card; @@ -1964,12 +1964,12 @@ static int snd_cs4231_ebus_create(struct snd_card *card, chip->op = op; memcpy(&chip->image, &snd_cs4231_original_image, sizeof(snd_cs4231_original_image)); - strcpy(chip->c_dma.ebus_info.name, "cs4231(capture)"); + strscpy(chip->c_dma.ebus_info.name, "cs4231(capture)"); chip->c_dma.ebus_info.flags = EBUS_DMA_FLAG_USE_EBDMA_HANDLER; chip->c_dma.ebus_info.callback = snd_cs4231_ebus_capture_callback; chip->c_dma.ebus_info.client_cookie = chip; chip->c_dma.ebus_info.irq = op->archdata.irqs[0]; - strcpy(chip->p_dma.ebus_info.name, "cs4231(play)"); + strscpy(chip->p_dma.ebus_info.name, "cs4231(play)"); chip->p_dma.ebus_info.flags = EBUS_DMA_FLAG_USE_EBDMA_HANDLER; chip->p_dma.ebus_info.callback = snd_cs4231_ebus_play_callback; chip->p_dma.ebus_info.client_cookie = chip; diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 69f1c9e37f4b..93cbe158009f 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c @@ -60,6 +60,7 @@ #include <linux/io.h> #include <linux/dma-mapping.h> #include <linux/gfp.h> +#include <linux/string.h> #include <sound/core.h> #include <sound/pcm.h> @@ -2239,7 +2240,7 @@ static int snd_dbri_pcm(struct snd_card *card) pcm->private_data = card->private_data; pcm->info_flags = 0; - strcpy(pcm->name, card->shortname); + strscpy(pcm->name, card->shortname); snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, NULL, 64 * 1024, 64 * 1024); @@ -2446,7 +2447,7 @@ static int snd_dbri_mixer(struct snd_card *card) return -EINVAL; dbri = card->private_data; - strcpy(card->mixername, card->shortname); + strscpy(card->mixername, card->shortname); for (idx = 0; idx < ARRAY_SIZE(dbri_controls); idx++) { err = snd_ctl_add(card, @@ -2613,8 +2614,8 @@ static int dbri_probe(struct platform_device *op) if (err < 0) return err; - strcpy(card->driver, "DBRI"); - strcpy(card->shortname, "Sun DBRI"); + strscpy(card->driver, "DBRI"); + strscpy(card->shortname, "Sun DBRI"); rp = &op->resource[0]; sprintf(card->longname, "%s at 0x%02lx:0x%016llx, irq %d", card->shortname, |