870/**
871 * device_register - register a device with the system.
872 * @dev: pointer to the device structure
873 *
874 * This happens in two clean steps - initialize the device
875 * and add it to the system. The two steps can be called
876 * separately, but this is the easiest and most common.
877 * I.e. you should only call the two helpers separately if
878 * have a clearly defined need to use and refcount the device
879 * before it is added to the hierarchy.
880 */
881int device_register(struct device *dev)
882{
883 device_initialize(dev);
884 return device_add(dev);
885}
初始化一个设备,然后加入到系统中。
详解Linux2.6内核中基于platform机制的驱动模型 (经典) (3)
内容版权声明:除非注明,否则皆为本站原创文章。