|
39 | 39 | #include <linux/of.h> |
40 | 40 | #include <linux/platform_device.h> |
41 | 41 | #include <linux/io.h> |
| 42 | +#include <linux/string.h> |
42 | 43 |
|
43 | 44 | #include <sound/core.h> |
44 | 45 | #include <sound/pcm.h> |
@@ -754,7 +755,7 @@ static int snd_amd7930_pcm(struct snd_amd7930 *amd) |
754 | 755 |
|
755 | 756 | pcm->private_data = amd; |
756 | 757 | pcm->info_flags = 0; |
757 | | - strcpy(pcm->name, amd->card->shortname); |
| 758 | + strscpy(pcm->name, amd->card->shortname); |
758 | 759 | amd->pcm = pcm; |
759 | 760 |
|
760 | 761 | snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, |
@@ -874,7 +875,7 @@ static int snd_amd7930_mixer(struct snd_amd7930 *amd) |
874 | 875 | return -EINVAL; |
875 | 876 |
|
876 | 877 | card = amd->card; |
877 | | - strcpy(card->mixername, card->shortname); |
| 878 | + strscpy(card->mixername, card->shortname); |
878 | 879 |
|
879 | 880 | for (idx = 0; idx < ARRAY_SIZE(amd7930_controls); idx++) { |
880 | 881 | if ((err = snd_ctl_add(card, |
@@ -1007,8 +1008,8 @@ static int amd7930_sbus_probe(struct platform_device *op) |
1007 | 1008 | if (err < 0) |
1008 | 1009 | return err; |
1009 | 1010 |
|
1010 | | - strcpy(card->driver, "AMD7930"); |
1011 | | - strcpy(card->shortname, "Sun AMD7930"); |
| 1011 | + strscpy(card->driver, "AMD7930"); |
| 1012 | + strscpy(card->shortname, "Sun AMD7930"); |
1012 | 1013 | sprintf(card->longname, "%s at 0x%02lx:0x%08Lx, irq %d", |
1013 | 1014 | card->shortname, |
1014 | 1015 | rp->flags & 0xffL, |
|
0 commit comments