| .. | .. |
|---|
| 28 | 28 | * zorro_device_id structure or %NULL if there is no match. |
|---|
| 29 | 29 | */ |
|---|
| 30 | 30 | |
|---|
| 31 | | -const struct zorro_device_id * |
|---|
| 31 | +static const struct zorro_device_id * |
|---|
| 32 | 32 | zorro_match_device(const struct zorro_device_id *ids, |
|---|
| 33 | 33 | const struct zorro_dev *z) |
|---|
| 34 | 34 | { |
|---|
| .. | .. |
|---|
| 39 | 39 | } |
|---|
| 40 | 40 | return NULL; |
|---|
| 41 | 41 | } |
|---|
| 42 | | -EXPORT_SYMBOL(zorro_match_device); |
|---|
| 43 | 42 | |
|---|
| 44 | 43 | |
|---|
| 45 | 44 | static int zorro_device_probe(struct device *dev) |
|---|
| .. | .. |
|---|
| 120 | 119 | * @ids: array of Zorro device id structures to search in |
|---|
| 121 | 120 | * @dev: the Zorro device structure to match against |
|---|
| 122 | 121 | * |
|---|
| 123 | | - * Used by a driver to check whether a Zorro device present in the |
|---|
| 124 | | - * system is in its list of supported devices.Returns the matching |
|---|
| 125 | | - * zorro_device_id structure or %NULL if there is no match. |
|---|
| 122 | + * Used by the driver core to check whether a Zorro device present in the |
|---|
| 123 | + * system is in a driver's list of supported devices. Returns 1 if |
|---|
| 124 | + * supported, and 0 if there is no match. |
|---|
| 126 | 125 | */ |
|---|
| 127 | 126 | |
|---|
| 128 | 127 | static int zorro_bus_match(struct device *dev, struct device_driver *drv) |
|---|
| .. | .. |
|---|
| 134 | 133 | if (!ids) |
|---|
| 135 | 134 | return 0; |
|---|
| 136 | 135 | |
|---|
| 137 | | - while (ids->id) { |
|---|
| 138 | | - if (ids->id == ZORRO_WILDCARD || ids->id == z->id) |
|---|
| 139 | | - return 1; |
|---|
| 140 | | - ids++; |
|---|
| 141 | | - } |
|---|
| 142 | | - return 0; |
|---|
| 136 | + return !!zorro_match_device(ids, z); |
|---|
| 143 | 137 | } |
|---|
| 144 | 138 | |
|---|
| 145 | 139 | static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env) |
|---|