diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-05-23 10:39:47 +0200 |
---|---|---|
committer | Bartosz Golaszewski <brgl@bgdev.pl> | 2022-06-02 09:17:38 +0200 |
commit | 7bb8a0cf49d5fede1104afdcb43bd2f8a1df3253 (patch) | |
tree | 93b1ff2e2df5262fabc5b260e3e2a98232796fd0 /tools/perf/arch/x86/util/topdown.c | |
parent | 43624eda86c98b0de726d0b6f2516ccc3ef7313f (diff) | |
download | linux-7bb8a0cf49d5fede1104afdcb43bd2f8a1df3253.tar.bz2 |
gpio: adp5588: Remove support for platform setup and teardown callbacks
If the teardown callback failed in the gpio driver, it fails to free the
irq (if there is one). The device is removed anyhow. If later on the irq
triggers, all sorts of unpleasant things might happen (e.g. accessing
the struct adp5588_gpio which is already freed in the meantime or starting
i2c bus transfers for an unregistered device). Even before irq support was
added to this driver, exiting early was wrong; back then it failed to
unregister the gpiochip.
Fortunately these callbacks aren't used any more since at least blackfin
was removed in 2018. So just drop them.
Note that they are not removed from struct adp5588_gpio_platform_data
because the keyboard driver adp5588-keys.c also makes use of them.
(I didn't check if the callbacks might have been called twice, maybe there
is another reason hidden to better not call these functions.)
This patch is a preparation for making i2c remove callbacks return void.
Fixes: 80884094e344 ("gpio: adp5588-gpio: new driver for ADP5588 GPIO expanders")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'tools/perf/arch/x86/util/topdown.c')
0 files changed, 0 insertions, 0 deletions