Skip to content

Commit bd85626

Browse files
rafaeljwJonathan Corbet
authored andcommitted
docs / driver-api: Fix structure references in device_link.rst
The format of the structure references in device_link.rst is incorrect, because it doesn't cause proper references to the struct data types to be generated (for struct dev_pm_domain in particular). Fix that by using the :c:type:`struct name <name>` convention for encoding references to struct data types. Fixes: aad8004 (Documentation/core-api/device_link: Add initial documentation) Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
1 parent e3941cd commit bd85626

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Documentation/driver-api/device_link.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. |struct dev_pm_domain| replace:: :c:type:`struct dev_pm_domain <dev_pm_domain>`
2+
.. |struct generic_pm_domain| replace:: :c:type:`struct generic_pm_domain <generic_pm_domain>`
3+
14
============
25
Device links
36
============
@@ -120,12 +123,11 @@ Examples
120123
is the same as if the MMU was the parent of the master device.
121124

122125
The fact that both devices share the same power domain would normally
123-
suggest usage of a :c:type:`struct dev_pm_domain` or :c:type:`struct
124-
generic_pm_domain`, however these are not independent devices that
125-
happen to share a power switch, but rather the MMU device serves the
126-
busmaster device and is useless without it. A device link creates a
127-
synthetic hierarchical relationship between the devices and is thus
128-
more apt.
126+
suggest usage of a |struct dev_pm_domain| or |struct generic_pm_domain|,
127+
however these are not independent devices that happen to share a power
128+
switch, but rather the MMU device serves the busmaster device and is
129+
useless without it. A device link creates a synthetic hierarchical
130+
relationship between the devices and is thus more apt.
129131

130132
* A Thunderbolt host controller comprises a number of PCIe hotplug ports
131133
and an NHI device to manage the PCIe switch. On resume from system sleep,
@@ -157,7 +159,7 @@ Examples
157159
Alternatives
158160
============
159161

160-
* A :c:type:`struct dev_pm_domain` can be used to override the bus,
162+
* A |struct dev_pm_domain| can be used to override the bus,
161163
class or device type callbacks. It is intended for devices sharing
162164
a single on/off switch, however it does not guarantee a specific
163165
suspend/resume ordering, this needs to be implemented separately.
@@ -166,7 +168,7 @@ Alternatives
166168
suspended. Furthermore it cannot be used to enforce a specific shutdown
167169
ordering or a driver presence dependency.
168170

169-
* A :c:type:`struct generic_pm_domain` is a lot more heavyweight than a
171+
* A |struct generic_pm_domain| is a lot more heavyweight than a
170172
device link and does not allow for shutdown ordering or driver presence
171173
dependencies. It also cannot be used on ACPI systems.
172174

0 commit comments

Comments
 (0)