Skip to content

Commit c597ce5

Browse files
dadaptiwai
authored andcommitted
ALSA: hda/tegra: Switch to two-argument strscpy()
strscpy() is used in this driver with char[] struct member destinations, so it is possible to use the simplified two-argument variant which was added by commit e6584c3 ("string: Allow 2-argument strscpy()"). Signed-off-by: Daniel Dadap <ddadap@nvidia.com> Link: https://patch.msgid.link/aC3lbOTYxWvYR9dl@ddadap-lakeline.nvidia.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 4b214c9 commit c597ce5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/pci/hda/hda_tegra.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,14 +384,14 @@ static int hda_tegra_first_init(struct azx *chip, struct platform_device *pdev)
384384
}
385385

386386
/* driver name */
387-
strscpy(card->driver, drv_name, sizeof(card->driver));
387+
strscpy(card->driver, drv_name);
388388
/* shortname for card */
389389
sname = of_get_property(np, "nvidia,model", NULL);
390390
if (!sname)
391391
sname = drv_name;
392392
if (strlen(sname) > sizeof(card->shortname))
393393
dev_info(card->dev, "truncating shortname for card\n");
394-
strscpy(card->shortname, sname, sizeof(card->shortname));
394+
strscpy(card->shortname, sname);
395395

396396
/* longname for card */
397397
snprintf(card->longname, sizeof(card->longname),

0 commit comments

Comments
 (0)