diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-27 15:41:06 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-27 15:41:06 -0400 |
| commit | 33cbfe54499338af08ab906a99afac247ea533f6 (patch) | |
| tree | a2af0661254396449942ca00e9f770d073d39db7 /include/linux/device.h | |
| parent | d77b3f07a1d7127f1ecaf82a95a36b8a3e8fc689 (diff) | |
Revert "driver core: Add edit_links() callback for drivers"
This reverts commit 134b23eec9e3a3c795a6ceb0efe2fa63e87983b2.
Based on a lot of email and in-person discussions, this patch series is
being reworked to address a number of issues that were pointed out that
needed to be taken care of before it should be merged. It will be
resubmitted with those changes hopefully soon.
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Saravana Kannan <saravanak@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 90142ec9ce84..73210745cc6b 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -349,20 +349,6 @@ enum probe_type { | |||
| 349 | * @probe_type: Type of the probe (synchronous or asynchronous) to use. | 349 | * @probe_type: Type of the probe (synchronous or asynchronous) to use. |
| 350 | * @of_match_table: The open firmware table. | 350 | * @of_match_table: The open firmware table. |
| 351 | * @acpi_match_table: The ACPI match table. | 351 | * @acpi_match_table: The ACPI match table. |
| 352 | * @edit_links: Called to allow a matched driver to edit the device links the | ||
| 353 | * bus might have added incorrectly. This will be useful to handle | ||
| 354 | * cases where the bus incorrectly adds functional dependencies | ||
| 355 | * that aren't true or tries to create cyclic dependencies. But | ||
| 356 | * doesn't correctly handle functional dependencies that are | ||
| 357 | * missed by the bus as the supplier's sync_state might get to | ||
| 358 | * execute before the driver for a missing consumer is loaded and | ||
| 359 | * gets to edit the device links for the consumer. | ||
| 360 | * | ||
| 361 | * This function might be called multiple times after a new device | ||
| 362 | * is added. The function is expected to create all the device | ||
| 363 | * links for the new device and return 0 if it was completed | ||
| 364 | * successfully or return an error if it needs to be reattempted | ||
| 365 | * in the future. | ||
| 366 | * @probe: Called to query the existence of a specific device, | 352 | * @probe: Called to query the existence of a specific device, |
| 367 | * whether this driver can work with it, and bind the driver | 353 | * whether this driver can work with it, and bind the driver |
| 368 | * to a specific device. | 354 | * to a specific device. |
| @@ -404,7 +390,6 @@ struct device_driver { | |||
| 404 | const struct of_device_id *of_match_table; | 390 | const struct of_device_id *of_match_table; |
| 405 | const struct acpi_device_id *acpi_match_table; | 391 | const struct acpi_device_id *acpi_match_table; |
| 406 | 392 | ||
| 407 | int (*edit_links)(struct device *dev); | ||
| 408 | int (*probe) (struct device *dev); | 393 | int (*probe) (struct device *dev); |
| 409 | int (*remove) (struct device *dev); | 394 | int (*remove) (struct device *dev); |
| 410 | void (*shutdown) (struct device *dev); | 395 | void (*shutdown) (struct device *dev); |
| @@ -1240,8 +1225,6 @@ struct dev_links_info { | |||
| 1240 | * @offline: Set after successful invocation of bus type's .offline(). | 1225 | * @offline: Set after successful invocation of bus type's .offline(). |
| 1241 | * @of_node_reused: Set if the device-tree node is shared with an ancestor | 1226 | * @of_node_reused: Set if the device-tree node is shared with an ancestor |
| 1242 | * device. | 1227 | * device. |
| 1243 | * @has_edit_links: This device has a driver than is capable of | ||
| 1244 | * editing the device links created by driver core. | ||
| 1245 | * @dma_coherent: this particular device is dma coherent, even if the | 1228 | * @dma_coherent: this particular device is dma coherent, even if the |
| 1246 | * architecture supports non-coherent devices. | 1229 | * architecture supports non-coherent devices. |
| 1247 | * | 1230 | * |
| @@ -1338,7 +1321,6 @@ struct device { | |||
| 1338 | bool offline_disabled:1; | 1321 | bool offline_disabled:1; |
| 1339 | bool offline:1; | 1322 | bool offline:1; |
| 1340 | bool of_node_reused:1; | 1323 | bool of_node_reused:1; |
| 1341 | bool has_edit_links:1; | ||
| 1342 | #if defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \ | 1324 | #if defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \ |
| 1343 | defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU) || \ | 1325 | defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU) || \ |
| 1344 | defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL) | 1326 | defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL) |
| @@ -1590,7 +1572,6 @@ extern int __must_check device_attach(struct device *dev); | |||
| 1590 | extern int __must_check driver_attach(struct device_driver *drv); | 1572 | extern int __must_check driver_attach(struct device_driver *drv); |
| 1591 | extern void device_initial_probe(struct device *dev); | 1573 | extern void device_initial_probe(struct device *dev); |
| 1592 | extern int __must_check device_reprobe(struct device *dev); | 1574 | extern int __must_check device_reprobe(struct device *dev); |
| 1593 | extern int driver_edit_links(struct device *dev); | ||
| 1594 | 1575 | ||
| 1595 | extern bool device_is_bound(struct device *dev); | 1576 | extern bool device_is_bound(struct device *dev); |
| 1596 | 1577 | ||
| @@ -1682,7 +1663,6 @@ struct device_link *device_link_add(struct device *consumer, | |||
| 1682 | struct device *supplier, u32 flags); | 1663 | struct device *supplier, u32 flags); |
| 1683 | void device_link_del(struct device_link *link); | 1664 | void device_link_del(struct device_link *link); |
| 1684 | void device_link_remove(void *consumer, struct device *supplier); | 1665 | void device_link_remove(void *consumer, struct device *supplier); |
| 1685 | void device_link_remove_from_wfs(struct device *consumer); | ||
| 1686 | 1666 | ||
| 1687 | #ifndef dev_fmt | 1667 | #ifndef dev_fmt |
| 1688 | #define dev_fmt(fmt) fmt | 1668 | #define dev_fmt(fmt) fmt |
