diff options
author | 2025-05-21 09:38:36 -0500 | |
---|---|---|
committer | 2025-05-21 22:15:29 +0200 | |
commit | c597ce56e9078c6fc27e44470e4c699bac2d3027 (patch) | |
tree | 6b3eb42663606399edfb4b60ff145681710fec2e /sound | |
parent | ALSA: hda - Add new driver for HDA controllers listed via ACPI (diff) | |
download | wireguard-linux-c597ce56e9078c6fc27e44470e4c699bac2d3027.tar.xz wireguard-linux-c597ce56e9078c6fc27e44470e4c699bac2d3027.zip |
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 e6584c3964f2 ("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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_tegra.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index 8c0dd439f5a5..6ab338f37db5 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -384,14 +384,14 @@ static int hda_tegra_first_init(struct azx *chip, struct platform_device *pdev) } /* driver name */ - strscpy(card->driver, drv_name, sizeof(card->driver)); + strscpy(card->driver, drv_name); /* shortname for card */ sname = of_get_property(np, "nvidia,model", NULL); if (!sname) sname = drv_name; if (strlen(sname) > sizeof(card->shortname)) dev_info(card->dev, "truncating shortname for card\n"); - strscpy(card->shortname, sname, sizeof(card->shortname)); + strscpy(card->shortname, sname); /* longname for card */ snprintf(card->longname, sizeof(card->longname), |