[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240811-const_dfc_done-v1-26-9d85e3f943cb@quicinc.com>
Date: Sun, 11 Aug 2024 10:25:17 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Cc: Zijun Hu <zijun_hu@...oud.com>, linux-kernel@...r.kernel.org,
Zijun Hu <quic_zijuhu@...cinc.com>
Subject: [PATCH 26/27] net: dsa: Make device_find_child()'s match function
take a const pointer
From: Zijun Hu <quic_zijuhu@...cinc.com>
In order to adapt for constified device_find_child(), make
dev_is_class() as its match function take a const pointer.
Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
net/dsa/dsa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 668c729946ea..a12b35f34c73 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -1367,7 +1367,7 @@ static int dsa_switch_parse_of(struct dsa_switch *ds, struct device_node *dn)
return dsa_switch_parse_ports_of(ds, dn);
}
-static int dev_is_class(struct device *dev, void *class)
+static int dev_is_class(struct device *dev, const void *class)
{
if (dev->class != NULL && !strcmp(dev->class->name, class))
return 1;
--
2.34.1
Powered by blists - more mailing lists