@@ -4079,8 +4079,8 @@ EXPORT_SYMBOL_GPL(device_for_each_child_reverse_from);
*
* NOTE: you will need to drop the reference with put_device() after use.
*/
-struct device *device_find_child(struct device *parent, void *data,
- int (*match)(struct device *dev, void *data))
+struct device *device_find_child(struct device *parent, const void *data,
+ device_match_t match)
{
struct klist_iter i;
struct device *child;
@@ -4125,11 +4125,6 @@ struct device *device_find_child_by_name(struct device *parent,
}
EXPORT_SYMBOL_GPL(device_find_child_by_name);
-static int match_any(struct device *dev, void *unused)
-{
- return 1;
-}
-
/**
* device_find_any_child - device iterator for locating a child device, if any.
* @parent: parent struct device
@@ -4141,7 +4136,7 @@ static int match_any(struct device *dev, void *unused)
*/
struct device *device_find_any_child(struct device *parent)
{
- return device_find_child(parent, NULL, match_any);
+ return device_find_child(parent, NULL, device_match_any);
}
EXPORT_SYMBOL_GPL(device_find_any_child);
@@ -1081,8 +1081,8 @@ int device_for_each_child_reverse(struct device *dev, void *data,
int device_for_each_child_reverse_from(struct device *parent,
struct device *from, const void *data,
int (*fn)(struct device *, const void *));
-struct device *device_find_child(struct device *dev, void *data,
- int (*match)(struct device *dev, void *data));
+struct device *device_find_child(struct device *dev, const void *data,
+ device_match_t match);
struct device *device_find_child_by_name(struct device *parent,
const char *name);
struct device *device_find_any_child(struct device *parent);