Re: [PATCH v2] ASoC: Replace snd_soc_acpi_check_hid with acpi_dev_present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 10 Nov 2017 17:20:50 +0100,
Jeremy Cline wrote:
>  struct snd_soc_acpi_mach *
>  snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
>  {
>  	struct snd_soc_acpi_mach *mach;
>  
>  	for (mach = machines; mach->id[0]; mach++) {
> -		if (snd_soc_acpi_check_hid(mach->id) == true) {
> +		if (acpi_dev_present(mach->id, NULL, -1) == true) {

"== true" is redundant.  Just use a style
		if (acpi_dev_present(...)) {

You don't need to follow the original code style.


> @@ -163,7 +135,7 @@ struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
>  		return mach;
>  
>  	for (i = 0; i < codec_list->num_codecs; i++) {
> -		if (snd_soc_acpi_check_hid(codec_list->codecs[i]) != true)
> +		if (acpi_dev_present(codec_list->codecs[i], NULL, -1) != true)

Ditto, use
		if (!acpi_dev_present(...))


thanks,

Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux