ipq40xx: qca8k: use remove_new
Easy compability fix for kernel 6.12. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18660 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
745b720c6b
commit
672caaf203
1 changed files with 4 additions and 6 deletions
|
@ -78,7 +78,7 @@ Signed-off-by: Robert Marko <robert.marko@sartura.hr>
|
||||||
if (dsa_is_cpu_port(priv->ds, i))
|
if (dsa_is_cpu_port(priv->ds, i))
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/net/dsa/qca/qca8k-ipq4019.c
|
+++ b/drivers/net/dsa/qca/qca8k-ipq4019.c
|
||||||
@@ -0,0 +1,950 @@
|
@@ -0,0 +1,948 @@
|
||||||
+// SPDX-License-Identifier: GPL-2.0
|
+// SPDX-License-Identifier: GPL-2.0
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (C) 2009 Felix Fietkau <nbd@nbd.name>
|
+ * Copyright (C) 2009 Felix Fietkau <nbd@nbd.name>
|
||||||
|
@ -990,14 +990,14 @@ Signed-off-by: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ return dsa_register_switch(priv->ds);
|
+ return dsa_register_switch(priv->ds);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static int
|
+static void
|
||||||
+qca8k_ipq4019_remove(struct platform_device *pdev)
|
+qca8k_ipq4019_remove(struct platform_device *pdev)
|
||||||
+{
|
+{
|
||||||
+ struct qca8k_priv *priv = dev_get_drvdata(&pdev->dev);
|
+ struct qca8k_priv *priv = dev_get_drvdata(&pdev->dev);
|
||||||
+ int i;
|
+ int i;
|
||||||
+
|
+
|
||||||
+ if (!priv)
|
+ if (!priv)
|
||||||
+ return 0;
|
+ return;
|
||||||
+
|
+
|
||||||
+ for (i = 0; i < QCA8K_IPQ4019_NUM_PORTS; i++)
|
+ for (i = 0; i < QCA8K_IPQ4019_NUM_PORTS; i++)
|
||||||
+ qca8k_port_set_status(priv, i, 0);
|
+ qca8k_port_set_status(priv, i, 0);
|
||||||
|
@ -1005,8 +1005,6 @@ Signed-off-by: Robert Marko <robert.marko@sartura.hr>
|
||||||
+ dsa_unregister_switch(priv->ds);
|
+ dsa_unregister_switch(priv->ds);
|
||||||
+
|
+
|
||||||
+ platform_set_drvdata(pdev, NULL);
|
+ platform_set_drvdata(pdev, NULL);
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static const struct of_device_id qca8k_ipq4019_of_match[] = {
|
+static const struct of_device_id qca8k_ipq4019_of_match[] = {
|
||||||
|
@ -1016,7 +1014,7 @@ Signed-off-by: Robert Marko <robert.marko@sartura.hr>
|
||||||
+
|
+
|
||||||
+static struct platform_driver qca8k_ipq4019_driver = {
|
+static struct platform_driver qca8k_ipq4019_driver = {
|
||||||
+ .probe = qca8k_ipq4019_probe,
|
+ .probe = qca8k_ipq4019_probe,
|
||||||
+ .remove = qca8k_ipq4019_remove,
|
+ .remove_new = qca8k_ipq4019_remove,
|
||||||
+ .driver = {
|
+ .driver = {
|
||||||
+ .name = "qca8k-ipq4019",
|
+ .name = "qca8k-ipq4019",
|
||||||
+ .of_match_table = qca8k_ipq4019_of_match,
|
+ .of_match_table = qca8k_ipq4019_of_match,
|
||||||
|
|
Loading…
Reference in a new issue