if (byt_rt5651_gpios) {
devm_acpi_dev_add_driver_gpios(codec_dev, byt_rt5651_gpios);
- priv->ext_amp_gpio = devm_fwnode_get_index_gpiod_from_child(
- &pdev->dev, "ext-amp-enable", 0,
- codec_dev->fwnode,
- GPIOD_OUT_LOW, "speaker-amp");
+ priv->ext_amp_gpio = devm_fwnode_gpiod_get(&pdev->dev,
+ codec_dev->fwnode,
+ "ext-amp-enable",
+ GPIOD_OUT_LOW,
+ "speaker-amp");
if (IS_ERR(priv->ext_amp_gpio)) {
ret_val = PTR_ERR(priv->ext_amp_gpio);
switch (ret_val) {
return ret_val;
}
}
- priv->hp_detect = devm_fwnode_get_index_gpiod_from_child(
- &pdev->dev, "hp-detect", 0,
- codec_dev->fwnode,
- GPIOD_IN, "hp-detect");
+ priv->hp_detect = devm_fwnode_gpiod_get(&pdev->dev,
+ codec_dev->fwnode,
+ "hp-detect",
+ GPIOD_IN,
+ "hp-detect");
if (IS_ERR(priv->hp_detect)) {
ret_val = PTR_ERR(priv->hp_detect);
switch (ret_val) {