aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma/main.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2011-08-19 16:14:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-22 14:21:41 -0400
commit886b66ef2f2d4984f6c72d86a9d8a3ffe4344fa5 (patch)
treef6115e0dcf8008377be21528ee8c2f3423086bb0 /drivers/bcma/main.c
parentb503c7a273c0a3018ad11ea8c513c639120afbf4 (diff)
bcma: add uevent to the bus, to autoload drivers
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/main.c')
-rw-r--r--drivers/bcma/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 873e2e4ac55f..73b7b1a18fab 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -15,6 +15,7 @@ MODULE_LICENSE("GPL");
15static int bcma_bus_match(struct device *dev, struct device_driver *drv); 15static int bcma_bus_match(struct device *dev, struct device_driver *drv);
16static int bcma_device_probe(struct device *dev); 16static int bcma_device_probe(struct device *dev);
17static int bcma_device_remove(struct device *dev); 17static int bcma_device_remove(struct device *dev);
18static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env);
18 19
19static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf) 20static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf)
20{ 21{
@@ -49,6 +50,7 @@ static struct bus_type bcma_bus_type = {
49 .match = bcma_bus_match, 50 .match = bcma_bus_match,
50 .probe = bcma_device_probe, 51 .probe = bcma_device_probe,
51 .remove = bcma_device_remove, 52 .remove = bcma_device_remove,
53 .uevent = bcma_device_uevent,
52 .dev_attrs = bcma_device_attrs, 54 .dev_attrs = bcma_device_attrs,
53}; 55};
54 56
@@ -227,6 +229,16 @@ static int bcma_device_remove(struct device *dev)
227 return 0; 229 return 0;
228} 230}
229 231
232static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env)
233{
234 struct bcma_device *core = container_of(dev, struct bcma_device, dev);
235
236 return add_uevent_var(env,
237 "MODALIAS=bcma:m%04Xid%04Xrev%02Xcl%02X",
238 core->id.manuf, core->id.id,
239 core->id.rev, core->id.class);
240}
241
230static int __init bcma_modinit(void) 242static int __init bcma_modinit(void)
231{ 243{
232 int err; 244 int err;