diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2014-04-26 06:57:03 (GMT) |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-29 22:24:54 (GMT) |
commit | 780aaeff96819ca58e0cad830bfbe6eee9aef82c (patch) | |
tree | 28e36bd081b08efae0a1508fc66ac723588dad13 /drivers/mfd/mc13xxx-core.c | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) | |
download | linux-780aaeff96819ca58e0cad830bfbe6eee9aef82c.tar.xz |
ASoC: mc13783: Add devicetree support
This patch adds devicetree support for mc13783-codec.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/mfd/mc13xxx-core.c')
-rw-r--r-- | drivers/mfd/mc13xxx-core.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c index 06e64b6..0c6c21c 100644 --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c @@ -673,9 +673,13 @@ int mc13xxx_common_init(struct device *dev) if (mc13xxx->flags & MC13XXX_USE_ADC) mc13xxx_add_subdevice(mc13xxx, "%s-adc"); - if (mc13xxx->flags & MC13XXX_USE_CODEC) - mc13xxx_add_subdevice_pdata(mc13xxx, "%s-codec", - pdata->codec, sizeof(*pdata->codec)); + if (mc13xxx->flags & MC13XXX_USE_CODEC) { + if (pdata) + mc13xxx_add_subdevice_pdata(mc13xxx, "%s-codec", + pdata->codec, sizeof(*pdata->codec)); + else + mc13xxx_add_subdevice(mc13xxx, "%s-codec"); + } if (mc13xxx->flags & MC13XXX_USE_RTC) mc13xxx_add_subdevice(mc13xxx, "%s-rtc"); |