Re: [driver-core PATCH v5 6/9] driver core: Probe devices asynchronously instead of the driver

From
Bart Van Assche <hidden>
Date
2018-11-07 00:22:47
Also in
lkml, nvdimm
Reply to
Alexander Duyck, 2018-11-05
On Mon, 2018-11-05 at 13:12 -0800, Alexander Duyck wrote:
quoted hunk ↗ jump to hunk
diff --git a/include/linux/device.h b/include/linux/device.h
index fc7091d436c2..4d9a39769081 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
[ ... ]
+static inline struct device_driver *dev_get_drv_async(const struct device *dev)
+{
+	return dev->async_probe ? dev->driver_data : NULL;
+}
+
+static inline void dev_set_drv_async(struct device *dev,
+				     struct device_driver *drv)
+{
+	/*
+	 * Set async_probe to true indicating we are waiting for this data to be
+	 * loaded as a potential driver.
+	 */
+	dev->driver_data = drv;
+	dev->async_probe = true;
+}
Since these two new functions are only used in the driver core please move
their definition into the driver core.

Thanks,

Bart.
Thread (33 messages) 33 messages, 8 authors, last reply 2018-11-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help