Skip to content

Commit

Permalink
ASoC: rt5514: The ACPI also should use the function rt5514_parse_dp()
Browse files Browse the repository at this point in the history
The patch fixed that the ACPI cannot access the device property from the
function rt5514_parse_dp().

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
oder_chiou@realtek.com authored and Mark Brown committed Nov 3, 2017
1 parent d660414 commit 28aef24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/soc/codecs/rt5514.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ static const struct acpi_device_id rt5514_acpi_match[] = {
MODULE_DEVICE_TABLE(acpi, rt5514_acpi_match);
#endif

static int rt5514_parse_dt(struct rt5514_priv *rt5514, struct device *dev)
static int rt5514_parse_dp(struct rt5514_priv *rt5514, struct device *dev)
{
device_property_read_u32(dev, "realtek,dmic-init-delay-ms",
&rt5514->pdata.dmic_init_delay);
Expand Down Expand Up @@ -1183,8 +1183,8 @@ static int rt5514_i2c_probe(struct i2c_client *i2c,

if (pdata)
rt5514->pdata = *pdata;
else if (i2c->dev.of_node)
rt5514_parse_dt(rt5514, &i2c->dev);
else
rt5514_parse_dp(rt5514, &i2c->dev);

rt5514->i2c_regmap = devm_regmap_init_i2c(i2c, &rt5514_i2c_regmap);
if (IS_ERR(rt5514->i2c_regmap)) {
Expand Down

0 comments on commit 28aef24

Please sign in to comment.