1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=322567

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