BACKPORT: UPSTREAM: amba: Make the remove callback return void
All amba drivers return 0 in their remove callback. Together with the driver core ignoring the return value anyhow, it doesn't make sense to return a value here. Change the remove prototype to return void, which makes it explicit that returning an error value doesn't work as expected. This simplifies changing the core remove callback to return void, too. Bug: 174685394 Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> # for drivers/memory Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com> # for hwtracing/coresight Acked-By: Vinod Koul <vkoul@kernel.org> # for dmaengine Acked-by: Guenter Roeck <linux@roeck-us.net> # for watchdog Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C Acked-by: Takashi Iwai <tiwai@suse.de> # for sound Acked-by: Vladimir Zapolskiy <vz@mleia.com> # for memory/pl172 Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20210126165835.687514-5-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> (cherry picked from commit 3fd269e74f2feec973f45ee11d822faeda4fe284) [Fixed conflicts in: - drivers/amba/bus.c - drivers/vfio/platform/vfio_amba.c by just removing the return value keeping the code as-is in android] Signed-off-by: Qais Yousef <qais.yousef@arm.com> Change-Id: Ia0ddc88b7d47bb94ae34a168b48c08eb7f95f7e4
This commit is contained in:
committed by
Todd Kjos
parent
ff559faca0
commit
ebe992a1ea
@@ -137,7 +137,7 @@ static int pl030_probe(struct amba_device *dev, const struct amba_id *id)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int pl030_remove(struct amba_device *dev)
|
||||
static void pl030_remove(struct amba_device *dev)
|
||||
{
|
||||
struct pl030_rtc *rtc = amba_get_drvdata(dev);
|
||||
|
||||
@@ -146,8 +146,6 @@ static int pl030_remove(struct amba_device *dev)
|
||||
free_irq(dev->irq[0], rtc);
|
||||
iounmap(rtc->base);
|
||||
amba_release_regions(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct amba_id pl030_ids[] = {
|
||||
|
||||
@@ -280,7 +280,7 @@ static int pl031_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pl031_remove(struct amba_device *adev)
|
||||
static void pl031_remove(struct amba_device *adev)
|
||||
{
|
||||
struct pl031_local *ldata = dev_get_drvdata(&adev->dev);
|
||||
|
||||
@@ -289,8 +289,6 @@ static int pl031_remove(struct amba_device *adev)
|
||||
if (adev->irq[0])
|
||||
free_irq(adev->irq[0], ldata);
|
||||
amba_release_regions(adev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
|
||||
Reference in New Issue
Block a user