-
-/* Find a device with a particular manufacturer and model string,
- starting from a given device number. Like the PCI equivalent,
- 'from' itself is skipped. */
-
-/**
- * parport_find_device - find a specific device
- * @mfg: required manufacturer string
- * @mdl: required model string
- * @from: previous device number found in search, or %NULL for
- * new search
- *
- * This walks through the list of parallel port devices looking
- * for a device whose 'MFG' string matches @mfg and whose 'MDL'
- * string matches @mdl in their IEEE 1284 Device ID.
- *
- * When a device is found matching those requirements, its device
- * number is returned; if there is no matching device, a negative
- * value is returned.
- *
- * A new search it initiated by passing %NULL as the @from
- * argument. If @from is not %NULL, the search continues from
- * that device.
- **/
-
-int parport_find_device (const char *mfg, const char *mdl, int from)
-{
- struct daisydev *d;
- int res = -1;
-
- /* Find where to start. */
-
- spin_lock(&topology_lock);
- d = topology; /* sorted by devnum */
- while (d && d->devnum <= from)
- d = d->next;
-
- /* Search. */
- while (d) {
- struct parport_device_info *info;
- info = &d->port->probe_info[1 + d->daisy];
- if ((!mfg || !strcmp (mfg, info->mfr)) &&
- (!mdl || !strcmp (mdl, info->model)))
- break;
-
- d = d->next;
- }
-
- if (d)
- res = d->devnum;
-
- spin_unlock(&topology_lock);
- return res;
-}
-
-/**
- * parport_find_class - find a device in a specified class
- * @cls: required class
- * @from: previous device number found in search, or %NULL for
- * new search
- *
- * This walks through the list of parallel port devices looking
- * for a device whose 'CLS' string matches @cls in their IEEE
- * 1284 Device ID.
- *
- * When a device is found matching those requirements, its device
- * number is returned; if there is no matching device, a negative
- * value is returned.
- *
- * A new search it initiated by passing %NULL as the @from
- * argument. If @from is not %NULL, the search continues from
- * that device.
- **/
-
-int parport_find_class (parport_device_class cls, int from)
-{
- struct daisydev *d;
- int res = -1;
-
- spin_lock(&topology_lock);
- d = topology; /* sorted by devnum */
- /* Find where to start. */
- while (d && d->devnum <= from)
- d = d->next;
-
- /* Search. */
- while (d && d->port->probe_info[1 + d->daisy].class != cls)
- d = d->next;
-
- if (d)
- res = d->devnum;
-
- spin_unlock(&topology_lock);
- return res;
-}
-
-EXPORT_SYMBOL(parport_open);
-EXPORT_SYMBOL(parport_close);
-EXPORT_SYMBOL(parport_device_num);
-EXPORT_SYMBOL(parport_device_coords);
-EXPORT_SYMBOL(parport_daisy_deselect_all);
-EXPORT_SYMBOL(parport_daisy_select);
-EXPORT_SYMBOL(parport_daisy_init);
-EXPORT_SYMBOL(parport_find_device);
-EXPORT_SYMBOL(parport_find_class);