UPSTREAM: coresight: etm4x: Fix merge resolution for amba rework

This was non-trivial to get right because commits
c23bc382ef ("coresight: etm4x: Refactor probing routine") and
5214b56358 ("coresight: etm4x: Add support for sysreg only devices")
changed the code flow considerably. With this change the driver can be
built again.

Bug: 174685394
Fixes: 0573d3fa48 ("Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next")
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Link: https://lore.kernel.org/r/20210205130848.20009-1-uwe@kleine-koenig.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1609faa9e6)
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Change-Id: Ifbd89b1e5015793e951a1cafd6c7ebdf345c0389
This commit is contained in:
Uwe Kleine-König 2021-02-05 14:08:47 +01:00 committed by Todd Kjos
parent c68c8910e8
commit c15968e1d6

View File

@ -1905,13 +1905,12 @@ static int __exit etm4_remove_dev(struct etmv4_drvdata *drvdata)
return 0;
}
static int __exit etm4_remove_amba(struct amba_device *adev)
static void __exit etm4_remove_amba(struct amba_device *adev)
{
struct etmv4_drvdata *drvdata = dev_get_drvdata(&adev->dev);
if (drvdata)
return etm4_remove_dev(drvdata);
return 0;
etm4_remove_dev(drvdata);
}
static int __exit etm4_remove_platform_dev(struct platform_device *pdev)