aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rapidio/rio-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rapidio/rio-driver.c')
-rw-r--r--drivers/rapidio/rio-driver.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/rapidio/rio-driver.c b/drivers/rapidio/rio-driver.c
index a0c875563d76..3e9b6a78ad18 100644
--- a/drivers/rapidio/rio-driver.c
+++ b/drivers/rapidio/rio-driver.c
@@ -199,6 +199,23 @@ static int rio_match_bus(struct device *dev, struct device_driver *drv)
199 out:return 0; 199 out:return 0;
200} 200}
201 201
202static int rio_uevent(struct device *dev, struct kobj_uevent_env *env)
203{
204 struct rio_dev *rdev;
205
206 if (!dev)
207 return -ENODEV;
208
209 rdev = to_rio_dev(dev);
210 if (!rdev)
211 return -ENODEV;
212
213 if (add_uevent_var(env, "MODALIAS=rapidio:v%04Xd%04Xav%04Xad%04X",
214 rdev->vid, rdev->did, rdev->asm_vid, rdev->asm_did))
215 return -ENOMEM;
216 return 0;
217}
218
202struct device rio_bus = { 219struct device rio_bus = {
203 .init_name = "rapidio", 220 .init_name = "rapidio",
204}; 221};
@@ -210,6 +227,7 @@ struct bus_type rio_bus_type = {
210 .bus_attrs = rio_bus_attrs, 227 .bus_attrs = rio_bus_attrs,
211 .probe = rio_device_probe, 228 .probe = rio_device_probe,
212 .remove = rio_device_remove, 229 .remove = rio_device_remove,
230 .uevent = rio_uevent,
213}; 231};
214 232
215/** 233/**