On Tue, May 17, 2016 at 02:49:49PM +0200, Petr Kulhavy wrote: > Add device-tree support to the WM8985 driver. > > Signed-off-by: Petr Kulhavy <petr@xxxxxxxxx> > --- > v1: initial > v2: add missing of_match_ptr() > use chip type enum instead of chip structure > > sound/soc/codecs/wm8985.c | 27 +++++++++++++++++++++++++-- > 1 file changed, 25 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c > index 436c7e2c5a0b..0b2dd2bc6fff 100644 > --- a/sound/soc/codecs/wm8985.c > +++ b/sound/soc/codecs/wm8985.c > @@ -32,6 +32,7 @@ > #include <sound/soc.h> > #include <sound/initval.h> > #include <sound/tlv.h> > +#include <linux/of_device.h> > > #include "wm8985.h" > > @@ -1174,10 +1175,21 @@ static const struct regmap_config wm8985_regmap = { > .num_reg_defaults = ARRAY_SIZE(wm8985_reg_defaults), > }; > > +static enum wm8985_type wm8985_data = WM8985; > +static enum wm8985_type wm8758_data = WM8758; > + > +static const struct of_device_id wm8985_of_match[] = { > + { .compatible = "wlf,wm8985", .data = &wm8985_data}, > + { .compatible = "wlf,wm8758", .data = &wm8758_data}, You can probably just use (void *)WM8985 instead here. Thanks, Charles _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel