[alsa-devel] [PATCH 1/3] [PATCH] ASoC: acpi: fix machine driver selection based on quirk

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Fri Jan 5 01:58:17 CET 2018



On 01/04/2018 09:18 AM, Pierre-Louis Bossart wrote:
> On 1/4/18 7:08 AM, Andy Shevchenko wrote:
>> On Wed, 2018-01-03 at 11:02 -0600, Pierre-Louis Bossart wrote:
>>> The ACPI/machine-driver code refactoring introduced in 4.13 introduced
>>> a regression for cases where we need a DMI-based quirk to select the
>>> machine driver (the BIOS reports an invalid HID). The fix is just to
>>> make sure the results of the quirk are actually used.
>>>
>>
>>>       for (mach = machines; mach->id[0]; mach++) {
>>>           if (snd_soc_acpi_check_hid(mach->id) == true) {
>>>               if (mach->machine_quirk(mach) != NULL)
>>
>> Just a nit: perhaps use more natural style, i.e. drop " != NULL" part
>> off?
>
> ok.
I found out while testing Andy's patches that there was a 
merge/copy-paste mistake here which wasn't detected in my tests - not 
sure how. it should be (as in the initial patch on bugzilla)

if (mach->machine_quirk)
                 mach = mach->machine_quirk(mach);

Will fix in the next version

>
>>
>>> +                mach = mach->machine_quirk(mach);
>>> +            return mach;
>>>           }
>>>       }
>>>       return NULL;
>>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



More information about the Alsa-devel mailing list