Oct. 20, 2015
5:01 p.m.
drivers/base/core.c has this generic code for creating that file:
if (device_supports_offline(dev) && !dev->offline_disabled) { error = device_create_file(dev, &dev_attr_online); if (error) goto err_remove_dev_groups; }
Thank you, that makes perfect sense. Really helpful.