10 Nov
2017
10 Nov
'17
5:28 p.m.
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