Add device resource management fields to struct device.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2017-08-16 06:33:48 +00:00
parent 04594feee5
commit 1f1c4ea123

View File

@ -113,6 +113,9 @@ struct device {
unsigned int msix;
unsigned int msix_max;
const struct attribute_group **groups;
spinlock_t devres_lock;
struct list_head devres_head;
};
extern struct device linux_root_device;
@ -290,6 +293,9 @@ device_initialize(struct device *dev)
dev->bsddev = bsddev;
MPASS(dev->bsddev != NULL);
kobject_init(&dev->kobj, &linux_dev_ktype);
spin_lock_init(&dev->devres_lock);
INIT_LIST_HEAD(&dev->devres_head);
}
static inline int