[alsa-devel] [PATCH 1/3] ASoC: alc5632: add an of_match table

Stephen Warren swarren at wwwdotorg.org
Tue Apr 1 00:53:57 CEST 2014

On 03/31/2014 04:45 PM, Mark Brown wrote:
> On Mon, Mar 31, 2014 at 01:47:04PM -0600, Stephen Warren wrote:
>> There seems to be a mix of ifdef'ing the table and using of_match_ptr()
>> vs. the other way around in ASoC. Mark, do you have a preference which
>> way to go?
> of_match_ptr() is supposed to avoid the warnings that the ifdefs fixed
> more prettily - I suspect you'll find that the ones that don't use it
> either predate of_match_ptr() or copied something that did.

I believe you either have the ifdef and the of_match_ptr(), or you have
neither. The use of of_match_ptr() is required when you wrap the
struct/array in an ifdef, so that the struct/array is only referenced
when it's declared.

I guess from your response you want the struct/array wrapped in an
ifdef, and to use of_match_ptr() when referencing it. I'll go ahead with
that; no need to reply if that's what you meant.

More information about the Alsa-devel mailing list