ff-hwdep.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) | ff-hwdep.c (75b1a8f9d62e50f05d0e4e9f3c8bcde32527ffc1) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * ff-hwdep.c - a part of driver for RME Fireface series 4 * 5 * Copyright (c) 2015-2017 Takashi Sakamoto 6 */ 7 8/* --- 65 unchanged lines hidden (view full) --- 74 struct fw_device *dev = fw_parent_device(ff->unit); 75 struct snd_firewire_get_info info; 76 77 memset(&info, 0, sizeof(info)); 78 info.type = SNDRV_FIREWIRE_TYPE_FIREFACE; 79 info.card = dev->card->index; 80 *(__be32 *)&info.guid[0] = cpu_to_be32(dev->config_rom[3]); 81 *(__be32 *)&info.guid[4] = cpu_to_be32(dev->config_rom[4]); | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * ff-hwdep.c - a part of driver for RME Fireface series 4 * 5 * Copyright (c) 2015-2017 Takashi Sakamoto 6 */ 7 8/* --- 65 unchanged lines hidden (view full) --- 74 struct fw_device *dev = fw_parent_device(ff->unit); 75 struct snd_firewire_get_info info; 76 77 memset(&info, 0, sizeof(info)); 78 info.type = SNDRV_FIREWIRE_TYPE_FIREFACE; 79 info.card = dev->card->index; 80 *(__be32 *)&info.guid[0] = cpu_to_be32(dev->config_rom[3]); 81 *(__be32 *)&info.guid[4] = cpu_to_be32(dev->config_rom[4]); |
82 strlcpy(info.device_name, dev_name(&dev->device), | 82 strscpy(info.device_name, dev_name(&dev->device), |
83 sizeof(info.device_name)); 84 85 if (copy_to_user(arg, &info, sizeof(info))) 86 return -EFAULT; 87 88 return 0; 89} 90 --- 100 unchanged lines hidden --- | 83 sizeof(info.device_name)); 84 85 if (copy_to_user(arg, &info, sizeof(info))) 86 return -EFAULT; 87 88 return 0; 89} 90 --- 100 unchanged lines hidden --- |