drv->shutdown(pnp_dev);
}
+static int pnp_uevent(const struct device *dev, struct kobj_uevent_env *env)
+{
+ struct pnp_id *pos;
+ const struct pnp_dev *pnp_dev = to_pnp_dev(dev);
+
+ if (!dev)
+ return -ENODEV;
+
+ pos = pnp_dev->id;
+ while (pos) {
+ if (add_uevent_var(env, "MODALIAS=pnp:d%s", pos->id))
+ return -ENOMEM;
+ pos = pos->next;
+ }
+
+ return 0;
+}
+
static int pnp_bus_match(struct device *dev, const struct device_driver *drv)
{
struct pnp_dev *pnp_dev = to_pnp_dev(dev);
const struct bus_type pnp_bus_type = {
.name = "pnp",
.match = pnp_bus_match,
+ .uevent = pnp_uevent,
.probe = pnp_device_probe,
.remove = pnp_device_remove,
.shutdown = pnp_device_shutdown,