Skip to content

Commit

Permalink
drm/amd/display: Replace block with strncpy() in fill_audio_info()
Browse files Browse the repository at this point in the history
Replace inlined strncpy with library call.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Andrey Grodzovsky  <andey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Tom St Denis authored and Alex Deucher committed Oct 21, 2017
1 parent 8440c30 commit d2b2562
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2238,11 +2238,9 @@ static void fill_audio_info(struct audio_info *audio_info,

cea_revision = drm_connector->display_info.cea_rev;

while (i < AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS &&
edid_caps->display_name[i]) {
audio_info->display_name[i] = edid_caps->display_name[i];
i++;
}
strncpy(audio_info->display_name,
edid_caps->display_name,
AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS - 1);

if (cea_revision >= 3) {
audio_info->mode_count = edid_caps->audio_mode_count;
Expand Down

0 comments on commit d2b2562

Please sign in to comment.