Commit 6b05266
drm/etnaviv: Remove #ifdef guards for PM related functions
Use the RUNTIME_PM_OPS() and pm_ptr() macros to handle the
.runtime_suspend/.runtime_resume callbacks.
These macros allow the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_PM is disabled, without having
to use #ifdef guards.
This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.
Some #ifdef CONFIG_PM guards were protecting simple statements, and were
also converted to "if (IS_ENABLED(CONFIG_PM))".
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>1 parent 764be12 commit 6b05266
1 file changed
Lines changed: 12 additions & 18 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1649 | 1649 | | |
1650 | 1650 | | |
1651 | 1651 | | |
1652 | | - | |
1653 | 1652 | | |
1654 | 1653 | | |
1655 | 1654 | | |
| |||
1665 | 1664 | | |
1666 | 1665 | | |
1667 | 1666 | | |
1668 | | - | |
1669 | 1667 | | |
1670 | 1668 | | |
1671 | 1669 | | |
| |||
1733 | 1731 | | |
1734 | 1732 | | |
1735 | 1733 | | |
1736 | | - | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
1741 | 1738 | | |
1742 | 1739 | | |
1743 | 1740 | | |
| |||
1781 | 1778 | | |
1782 | 1779 | | |
1783 | 1780 | | |
1784 | | - | |
1785 | | - | |
1786 | | - | |
1787 | | - | |
1788 | | - | |
1789 | | - | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
1790 | 1787 | | |
1791 | 1788 | | |
1792 | 1789 | | |
| |||
1900 | 1897 | | |
1901 | 1898 | | |
1902 | 1899 | | |
1903 | | - | |
1904 | 1900 | | |
1905 | 1901 | | |
1906 | 1902 | | |
| |||
1943 | 1939 | | |
1944 | 1940 | | |
1945 | 1941 | | |
1946 | | - | |
1947 | 1942 | | |
1948 | 1943 | | |
1949 | | - | |
1950 | | - | |
| 1944 | + | |
1951 | 1945 | | |
1952 | 1946 | | |
1953 | 1947 | | |
1954 | 1948 | | |
1955 | 1949 | | |
1956 | 1950 | | |
1957 | | - | |
| 1951 | + | |
1958 | 1952 | | |
1959 | 1953 | | |
1960 | 1954 | | |
| |||
0 commit comments