Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Woodhouse and committed by
John W. Linville
886b66ef b503c7a2

+12
+12
drivers/bcma/main.c
··· 15 15 static int bcma_bus_match(struct device *dev, struct device_driver *drv); 16 16 static int bcma_device_probe(struct device *dev); 17 17 static int bcma_device_remove(struct device *dev); 18 + static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env); 18 19 19 20 static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf) 20 21 { ··· 50 49 .match = bcma_bus_match, 51 50 .probe = bcma_device_probe, 52 51 .remove = bcma_device_remove, 52 + .uevent = bcma_device_uevent, 53 53 .dev_attrs = bcma_device_attrs, 54 54 }; 55 55 ··· 227 225 adrv->remove(core); 228 226 229 227 return 0; 228 + } 229 + 230 + static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env) 231 + { 232 + struct bcma_device *core = container_of(dev, struct bcma_device, dev); 233 + 234 + return add_uevent_var(env, 235 + "MODALIAS=bcma:m%04Xid%04Xrev%02Xcl%02X", 236 + core->id.manuf, core->id.id, 237 + core->id.rev, core->id.class); 230 238 } 231 239 232 240 static int __init bcma_modinit(void)