ath9k: register GPIO chip for OF targets
This partitialy reverts commit
ccab68f2d399.
Registering the GPIO chip without a parent device completely breaks the
ath9k GPIOs for device tree targets.
As long as boards using the devicetree don't have the gpio-controller
property set for the ath9k node, the unloading of the driver works as
expected.
Register the GPIO chip with the ath9k device as parent only for OF
targets to find a trade-off between the needs of driver developers and
the broken LEDs and buttons seen by users.
Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from
d35f2a5565fc51fb277f72a8565c871ce1785588)