Skip to content

Commit 6624d64

Browse files
committed
docs: devices.rst: get rid of :c:type macros
There's no need to use macros to use :c:type on this file, as automarkup.py should do this automatically. Also, this breaks compatibility with Sphinx 3.x, as there, structs should be declared using .. c:struct. So, get rid of them. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent 74e2f8d commit 6624d64

1 file changed

Lines changed: 8 additions & 16 deletions

File tree

‎Documentation/driver-api/pm/devices.rst‎

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
.. include:: <isonum.txt>
33

4-
.. |struct dev_pm_ops| replace:: :c:type:`struct dev_pm_ops <dev_pm_ops>`
5-
.. |struct dev_pm_domain| replace:: :c:type:`struct dev_pm_domain <dev_pm_domain>`
6-
.. |struct bus_type| replace:: :c:type:`struct bus_type <bus_type>`
7-
.. |struct device_type| replace:: :c:type:`struct device_type <device_type>`
8-
.. |struct class| replace:: :c:type:`struct class <class>`
9-
.. |struct wakeup_source| replace:: :c:type:`struct wakeup_source <wakeup_source>`
10-
.. |struct device| replace:: :c:type:`struct device <device>`
11-
124
.. _driverapi_pm_devices:
135

146
==============================
@@ -107,15 +99,15 @@ Device Power Management Operations
10799

108100
Device power management operations, at the subsystem level as well as at the
109101
device driver level, are implemented by defining and populating objects of type
110-
|struct dev_pm_ops| defined in :file:`include/linux/pm.h`. The roles of the
102+
struct dev_pm_ops defined in :file:`include/linux/pm.h`. The roles of the
111103
methods included in it will be explained in what follows. For now, it should be
112104
sufficient to remember that the last three methods are specific to runtime power
113105
management while the remaining ones are used during system-wide power
114106
transitions.
115107

116108
There also is a deprecated "old" or "legacy" interface for power management
117109
operations available at least for some subsystems. This approach does not use
118-
|struct dev_pm_ops| objects and it is suitable only for implementing system
110+
struct dev_pm_ops objects and it is suitable only for implementing system
119111
sleep power management methods in a limited way. Therefore it is not described
120112
in this document, so please refer directly to the source code for more
121113
information about it.
@@ -125,9 +117,9 @@ Subsystem-Level Methods
125117
-----------------------
126118

127119
The core methods to suspend and resume devices reside in
128-
|struct dev_pm_ops| pointed to by the :c:member:`ops` member of
129-
|struct dev_pm_domain|, or by the :c:member:`pm` member of |struct bus_type|,
130-
|struct device_type| and |struct class|. They are mostly of interest to the
120+
struct dev_pm_ops pointed to by the :c:member:`ops` member of
121+
struct dev_pm_domain, or by the :c:member:`pm` member of struct bus_type,
122+
struct device_type and struct class. They are mostly of interest to the
131123
people writing infrastructure for platforms and buses, like PCI or USB, or
132124
device type and device class drivers. They also are relevant to the writers of
133125
device drivers whose subsystems (PM domains, device types, device classes and
@@ -156,7 +148,7 @@ The :c:member:`power.can_wakeup` flag just records whether the device (and its
156148
driver) can physically support wakeup events. The
157149
:c:func:`device_set_wakeup_capable()` routine affects this flag. The
158150
:c:member:`power.wakeup` field is a pointer to an object of type
159-
|struct wakeup_source| used for controlling whether or not the device should use
151+
struct wakeup_source used for controlling whether or not the device should use
160152
its system wakeup mechanism and for notifying the PM core of system wakeup
161153
events signaled by the device. This object is only present for wakeup-capable
162154
devices (i.e. devices whose :c:member:`can_wakeup` flags are set) and is created
@@ -713,8 +705,8 @@ nested inside another power domain. The nested domain is referred to as the
713705
sub-domain of the parent domain.
714706

715707
Support for power domains is provided through the :c:member:`pm_domain` field of
716-
|struct device|. This field is a pointer to an object of type
717-
|struct dev_pm_domain|, defined in :file:`include/linux/pm.h`, providing a set
708+
struct device. This field is a pointer to an object of type
709+
struct dev_pm_domain, defined in :file:`include/linux/pm.h`, providing a set
718710
of power management callbacks analogous to the subsystem-level and device driver
719711
callbacks that are executed for the given device during all power transitions,
720712
instead of the respective subsystem-level callbacks. Specifically, if a

0 commit comments

Comments
 (0)