hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/zorro/zorro-driver.c
....@@ -28,7 +28,7 @@
2828 * zorro_device_id structure or %NULL if there is no match.
2929 */
3030
31
-const struct zorro_device_id *
31
+static const struct zorro_device_id *
3232 zorro_match_device(const struct zorro_device_id *ids,
3333 const struct zorro_dev *z)
3434 {
....@@ -39,7 +39,6 @@
3939 }
4040 return NULL;
4141 }
42
-EXPORT_SYMBOL(zorro_match_device);
4342
4443
4544 static int zorro_device_probe(struct device *dev)
....@@ -120,9 +119,9 @@
120119 * @ids: array of Zorro device id structures to search in
121120 * @dev: the Zorro device structure to match against
122121 *
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.
126125 */
127126
128127 static int zorro_bus_match(struct device *dev, struct device_driver *drv)
....@@ -134,12 +133,7 @@
134133 if (!ids)
135134 return 0;
136135
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);
143137 }
144138
145139 static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env)