ath79: rb91x-key: use more devm
authorRosen Penev <rosenp@gmail.com>
Thu, 15 Aug 2024 02:17:37 +0000 (19:17 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 3 Oct 2024 15:16:50 +0000 (17:16 +0200)
commitdedeb28755d6a9eb00d63e60f82e4334be09b9e4
treeb90279bfab8d41c32832ac6a5ee31ad54bd38ace
parentc38f04a092ca3d3a8dd1d4eb586b92a89726ad29
ath79: rb91x-key: use more devm

Use devm_gpiochip_add_data to get rid of the remove function. No need
for it.

Also use dev_err_probe to simplify the error path and avoid having to
handle -EPROBE_DEFER manually.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16506
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c