--- zzzz-none-000/linux-3.10.107/sound/pci/cs5535audio/cs5535audio_olpc.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/pci/cs5535audio/cs5535audio_olpc.c 2021-02-04 17:41:59.000000000 +0000 @@ -36,7 +36,8 @@ err = snd_ac97_update_bits(ac97, AC97_AD_TEST2, 1 << AC97_AD_HPFD_SHIFT, on << AC97_AD_HPFD_SHIFT); if (err < 0) { - snd_printk(KERN_ERR "setting High Pass Filter - %d\n", err); + dev_err(ac97->bus->card->dev, + "setting High Pass Filter - %d\n", err); return; } @@ -58,7 +59,7 @@ err = snd_ac97_update_bits(ac97, AC97_AD_MISC, 1 << AC97_AD_VREFD_SHIFT, on << AC97_AD_VREFD_SHIFT); if (err < 0) - snd_printk(KERN_ERR "setting MIC Bias - %d\n", err); + dev_err(ac97->bus->card->dev, "setting MIC Bias - %d\n", err); } static int olpc_dc_info(struct snd_kcontrol *kctl, @@ -153,7 +154,7 @@ return 0; if (gpio_request(OLPC_GPIO_MIC_AC, DRV_NAME)) { - printk(KERN_ERR DRV_NAME ": unable to allocate MIC GPIO\n"); + dev_err(card->dev, "unable to allocate MIC GPIO\n"); return -EIO; } gpio_direction_output(OLPC_GPIO_MIC_AC, 0); @@ -161,13 +162,13 @@ /* drop the original AD1888 HPF control */ memset(&elem, 0, sizeof(elem)); elem.iface = SNDRV_CTL_ELEM_IFACE_MIXER; - strncpy(elem.name, "High Pass Filter Enable", sizeof(elem.name)); + strlcpy(elem.name, "High Pass Filter Enable", sizeof(elem.name)); snd_ctl_remove_id(card, &elem); /* drop the original V_REFOUT control */ memset(&elem, 0, sizeof(elem)); elem.iface = SNDRV_CTL_ELEM_IFACE_MIXER; - strncpy(elem.name, "V_REFOUT Enable", sizeof(elem.name)); + strlcpy(elem.name, "V_REFOUT Enable", sizeof(elem.name)); snd_ctl_remove_id(card, &elem); /* add the OLPC-specific controls */