.. | .. |
---|
405 | 405 | } |
---|
406 | 406 | EXPORT_SYMBOL_GPL(mux_control_deselect); |
---|
407 | 407 | |
---|
408 | | -static int of_dev_node_match(struct device *dev, const void *data) |
---|
409 | | -{ |
---|
410 | | - return dev->of_node == data; |
---|
411 | | -} |
---|
412 | | - |
---|
413 | 408 | /* Note this function returns a reference to the mux_chip dev. */ |
---|
414 | 409 | static struct mux_chip *of_find_mux_chip_by_node(struct device_node *np) |
---|
415 | 410 | { |
---|
416 | 411 | struct device *dev; |
---|
417 | 412 | |
---|
418 | | - dev = class_find_device(&mux_class, NULL, np, of_dev_node_match); |
---|
| 413 | + dev = class_find_device_by_of_node(&mux_class, np); |
---|
419 | 414 | |
---|
420 | 415 | return dev ? to_mux_chip(dev) : NULL; |
---|
421 | 416 | } |
---|