Commit 886b66ef authored by David Woodhouse's avatar David Woodhouse Committed by John W. Linville

bcma: add uevent to the bus, to autoload drivers

Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
Acked-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b503c7a2
...@@ -15,6 +15,7 @@ MODULE_LICENSE("GPL"); ...@@ -15,6 +15,7 @@ MODULE_LICENSE("GPL");
static int bcma_bus_match(struct device *dev, struct device_driver *drv); static int bcma_bus_match(struct device *dev, struct device_driver *drv);
static int bcma_device_probe(struct device *dev); static int bcma_device_probe(struct device *dev);
static int bcma_device_remove(struct device *dev); static int bcma_device_remove(struct device *dev);
static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env);
static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf) static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf)
{ {
...@@ -49,6 +50,7 @@ static struct bus_type bcma_bus_type = { ...@@ -49,6 +50,7 @@ static struct bus_type bcma_bus_type = {
.match = bcma_bus_match, .match = bcma_bus_match,
.probe = bcma_device_probe, .probe = bcma_device_probe,
.remove = bcma_device_remove, .remove = bcma_device_remove,
.uevent = bcma_device_uevent,
.dev_attrs = bcma_device_attrs, .dev_attrs = bcma_device_attrs,
}; };
...@@ -227,6 +229,16 @@ static int bcma_device_remove(struct device *dev) ...@@ -227,6 +229,16 @@ static int bcma_device_remove(struct device *dev)
return 0; return 0;
} }
static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env)
{
struct bcma_device *core = container_of(dev, struct bcma_device, dev);
return add_uevent_var(env,
"MODALIAS=bcma:m%04Xid%04Xrev%02Xcl%02X",
core->id.manuf, core->id.id,
core->id.rev, core->id.class);
}
static int __init bcma_modinit(void) static int __init bcma_modinit(void)
{ {
int err; int err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment