hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/mux/core.c
....@@ -405,17 +405,12 @@
405405 }
406406 EXPORT_SYMBOL_GPL(mux_control_deselect);
407407
408
-static int of_dev_node_match(struct device *dev, const void *data)
409
-{
410
- return dev->of_node == data;
411
-}
412
-
413408 /* Note this function returns a reference to the mux_chip dev. */
414409 static struct mux_chip *of_find_mux_chip_by_node(struct device_node *np)
415410 {
416411 struct device *dev;
417412
418
- dev = class_find_device(&mux_class, NULL, np, of_dev_node_match);
413
+ dev = class_find_device_by_of_node(&mux_class, np);
419414
420415 return dev ? to_mux_chip(dev) : NULL;
421416 }