Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Aug 2017 06:33:48 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r322567 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201708160633.v7G6XmH8080153@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708160633.v7G6XmH8080153>