Skip to content

Commit d6e2c06

Browse files
tobluxtiwai
authored andcommitted
ALSA: mips/sgio2audio: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead. No functional changes intended. Link: KSPP/linux#88 Signed-off-by: Thorsten Blum <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 92f59ae commit d6e2c06

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sound/mips/sgio2audio.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/platform_device.h>
1717
#include <linux/io.h>
1818
#include <linux/slab.h>
19+
#include <linux/string.h>
1920
#include <linux/module.h>
2021

2122
#include <asm/ip32/ip32_ints.h>
@@ -685,7 +686,7 @@ static int snd_sgio2audio_new_pcm(struct snd_sgio2audio *chip)
685686
return err;
686687

687688
pcm->private_data = chip;
688-
strcpy(pcm->name, "SGI O2 DAC1");
689+
strscpy(pcm->name, "SGI O2 DAC1");
689690

690691
/* set operators */
691692
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
@@ -700,7 +701,7 @@ static int snd_sgio2audio_new_pcm(struct snd_sgio2audio *chip)
700701
return err;
701702

702703
pcm->private_data = chip;
703-
strcpy(pcm->name, "SGI O2 DAC2");
704+
strscpy(pcm->name, "SGI O2 DAC2");
704705

705706
/* set operators */
706707
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
@@ -892,8 +893,8 @@ static int snd_sgio2audio_probe(struct platform_device *pdev)
892893
return err;
893894
}
894895

895-
strcpy(card->driver, "SGI O2 Audio");
896-
strcpy(card->shortname, "SGI O2 Audio");
896+
strscpy(card->driver, "SGI O2 Audio");
897+
strscpy(card->shortname, "SGI O2 Audio");
897898
sprintf(card->longname, "%s irq %i-%i",
898899
card->shortname,
899900
MACEISA_AUDIO1_DMAT_IRQ,

0 commit comments

Comments
 (0)