svn commit: r322567 - head/sys/compat/linuxkpi/common/include/linux
Mark Johnston
markj at FreeBSD.org
Wed Aug 16 06:33:49 UTC 2017
Author: markj
Date: Wed Aug 16 06:33:48 2017
New Revision: 322567
URL: https://svnweb.freebsd.org/changeset/base/322567
Log:
Add device resource management fields to struct device.
MFC after: 1 week
Modified:
head/sys/compat/linuxkpi/common/include/linux/device.h
Modified: head/sys/compat/linuxkpi/common/include/linux/device.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/device.h Wed Aug 16 05:51:05 2017 (r322566)
+++ head/sys/compat/linuxkpi/common/include/linux/device.h Wed Aug 16 06:33:48 2017 (r322567)
@@ -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
More information about the svn-src-all
mailing list