ath79: convert driver to .remove_new
Convert driver to .remove_new in preparation for kernel 6.12 support. Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Link: https://github.com/openwrt/openwrt/pull/18535 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
559ca4eaa5
commit
45743a3637
5 changed files with 12 additions and 19 deletions
|
@ -1452,7 +1452,7 @@ err_free_buf:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int ar934x_nfc_remove(struct platform_device *pdev)
|
||||
static void ar934x_nfc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct ar934x_nfc *nfc;
|
||||
|
||||
|
@ -1462,8 +1462,6 @@ static int ar934x_nfc_remove(struct platform_device *pdev)
|
|||
nand_cleanup(&nfc->nand_chip);
|
||||
ar934x_nfc_free_buf(nfc);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id ar934x_nfc_match[] = {
|
||||
|
@ -1475,7 +1473,7 @@ MODULE_DEVICE_TABLE(of, ar934x_nfc_match);
|
|||
|
||||
static struct platform_driver ar934x_nfc_driver = {
|
||||
.probe = ar934x_nfc_probe,
|
||||
.remove = ar934x_nfc_remove,
|
||||
.remove_new = ar934x_nfc_remove,
|
||||
.driver = {
|
||||
.name = AR934X_NFC_DRIVER_NAME,
|
||||
.of_match_table = ar934x_nfc_match,
|
||||
|
|
|
@ -214,14 +214,12 @@ static int rb4xx_nand_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int rb4xx_nand_remove(struct platform_device *pdev)
|
||||
static void rb4xx_nand_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct rb4xx_nand *nand = platform_get_drvdata(pdev);
|
||||
|
||||
mtd_device_unregister(nand_to_mtd(&nand->chip));
|
||||
nand_cleanup(&nand->chip);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct platform_device_id rb4xx_nand_id_table[] = {
|
||||
|
@ -232,7 +230,7 @@ MODULE_DEVICE_TABLE(platform, rb4xx_nand_id_table);
|
|||
|
||||
static struct platform_driver rb4xx_nand_driver = {
|
||||
.probe = rb4xx_nand_probe,
|
||||
.remove = rb4xx_nand_remove,
|
||||
.remove_new = rb4xx_nand_remove,
|
||||
.id_table = rb4xx_nand_id_table,
|
||||
.driver = {
|
||||
.name = "rb4xx-nand",
|
||||
|
|
|
@ -335,13 +335,11 @@ static int rb91x_nand_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int rb91x_nand_remove(struct platform_device *pdev)
|
||||
static void rb91x_nand_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct rb91x_nand_drvdata *drvdata = platform_get_drvdata(pdev);
|
||||
|
||||
rb91x_nand_release(drvdata);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id rb91x_nand_match[] = {
|
||||
|
@ -353,7 +351,7 @@ MODULE_DEVICE_TABLE(of, rb91x_nand_match);
|
|||
|
||||
static struct platform_driver rb91x_nand_driver = {
|
||||
.probe = rb91x_nand_probe,
|
||||
.remove = rb91x_nand_remove,
|
||||
.remove_new = rb91x_nand_remove,
|
||||
.driver = {
|
||||
.name = "rb91x-nand",
|
||||
.of_match_table = rb91x_nand_match,
|
||||
|
|
|
@ -221,12 +221,11 @@ static int ag71xx_mdio_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ag71xx_mdio_remove(struct platform_device *pdev)
|
||||
static void ag71xx_mdio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct ag71xx_mdio *am = platform_get_drvdata(pdev);
|
||||
|
||||
mdiobus_unregister(am->mii_bus);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id ag71xx_mdio_match[] = {
|
||||
|
@ -239,7 +238,7 @@ static const struct of_device_id ag71xx_mdio_match[] = {
|
|||
|
||||
static struct platform_driver ag71xx_mdio_driver = {
|
||||
.probe = ag71xx_mdio_probe,
|
||||
.remove = ag71xx_mdio_remove,
|
||||
.remove_new = ag71xx_mdio_remove,
|
||||
.driver = {
|
||||
.name = "ag71xx-legacy-mdio",
|
||||
.of_match_table = ag71xx_mdio_match,
|
||||
|
|
|
@ -1731,20 +1731,20 @@ err_phy_disconnect:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int ag71xx_remove(struct platform_device *pdev)
|
||||
static void ag71xx_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct net_device *dev = platform_get_drvdata(pdev);
|
||||
struct ag71xx *ag;
|
||||
|
||||
if (!dev)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
ag = netdev_priv(dev);
|
||||
ag71xx_debugfs_exit(ag);
|
||||
ag71xx_phy_disconnect(ag);
|
||||
unregister_netdev(dev);
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static const struct of_device_id ag71xx_match[] = {
|
||||
|
@ -1763,7 +1763,7 @@ static const struct of_device_id ag71xx_match[] = {
|
|||
|
||||
static struct platform_driver ag71xx_driver = {
|
||||
.probe = ag71xx_probe,
|
||||
.remove = ag71xx_remove,
|
||||
.remove_new = ag71xx_remove,
|
||||
.driver = {
|
||||
.name = AG71XX_DRV_NAME,
|
||||
.of_match_table = ag71xx_match,
|
||||
|
|
Loading…
Reference in a new issue