If we devm get the micd_pol_gpio against the madera device it won't be
destroyed until after all the children of the MFD. Usually the
micd_pol_gpio will be supplied by the Madera GPIO driver, this means the
GPIO will normally only be freed after its driver has been removed.
Correct this issue by getting it against the extcon device such that the
GPIO is freed when the extcon device is destroyed, which should happen
before the GPIO device.
Change-Id: I35a3ee9eba7f9edf5c6aba47dd03f6e0ecbe9692
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
else
gpio_status = GPIOD_OUT_LOW;
- info->micd_pol_gpio = devm_fwnode_get_gpiod_from_child(madera->dev,
+ info->micd_pol_gpio = devm_fwnode_get_gpiod_from_child(info->dev,
"cirrus,micd-pol",
node,
gpio_status,