-static int do_callout(struct sysfs_class_device *class_dev, struct udevice *udev, struct sysfs_device *sysfs_device)
-{
- struct config_device *dev;
- struct list_head *tmp;
-
- list_for_each(tmp, &config_device_list) {
- dev = list_entry(tmp, struct config_device, node);
- if (dev->type != CALLOUT)
- continue;
-
- if (dev->bus[0] != '\0') {
- /* as the user specified a bus, we must match it up */
- if (!sysfs_device)
- continue;
- dbg("dev->bus='%s' sysfs_device->bus='%s'", dev->bus, sysfs_device->bus);
- if (strcasecmp(dev->bus, sysfs_device->bus) != 0)
- continue;
- }
-
- /* substitute anything that needs to be in the program name */
- apply_format(udev, dev->exec_program);
- if (exec_callout(dev, udev->callout_value, NAME_SIZE))
- continue;
- if (strcmp_pattern(dev->id, udev->callout_value) != 0)
- continue;
- strfieldcpy(udev->name, dev->name);
- strfieldcpy(udev->symlink, dev->symlink);
- dbg("callout returned matching value '%s', '%s' becomes '%s'",
- dev->id, class_dev->name, udev->name);
- return 0;
- }
- return -ENODEV;
-}
-
-static int match_pair(struct sysfs_class_device *class_dev, struct sysfs_device *sysfs_device, struct sysfs_pair *pair)