.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Driver for Atmel Flexcom |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2015 Atmel Corporation |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Cyrille Pitchen <cyrille.pitchen@atmel.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | | - * |
---|
12 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
---|
13 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
14 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
15 | | - * more details. |
---|
16 | | - * |
---|
17 | | - * You should have received a copy of the GNU General Public License along with |
---|
18 | | - * this program. If not, see <http://www.gnu.org/licenses/>. |
---|
19 | 8 | */ |
---|
20 | 9 | |
---|
21 | 10 | #include <linux/module.h> |
---|
.. | .. |
---|
98 | 87 | }; |
---|
99 | 88 | MODULE_DEVICE_TABLE(of, atmel_flexcom_of_match); |
---|
100 | 89 | |
---|
101 | | -#ifdef CONFIG_PM_SLEEP |
---|
102 | | -static int atmel_flexcom_resume(struct device *dev) |
---|
| 90 | +static int __maybe_unused atmel_flexcom_resume_noirq(struct device *dev) |
---|
103 | 91 | { |
---|
104 | 92 | struct atmel_flexcom *ddata = dev_get_drvdata(dev); |
---|
105 | 93 | int err; |
---|
.. | .. |
---|
116 | 104 | |
---|
117 | 105 | return 0; |
---|
118 | 106 | } |
---|
119 | | -#endif |
---|
120 | 107 | |
---|
121 | | -static SIMPLE_DEV_PM_OPS(atmel_flexcom_pm_ops, NULL, |
---|
122 | | - atmel_flexcom_resume); |
---|
| 108 | +static const struct dev_pm_ops atmel_flexcom_pm_ops = { |
---|
| 109 | + .resume_noirq = atmel_flexcom_resume_noirq, |
---|
| 110 | +}; |
---|
123 | 111 | |
---|
124 | 112 | static struct platform_driver atmel_flexcom_driver = { |
---|
125 | 113 | .probe = atmel_flexcom_probe, |
---|
126 | 114 | .driver = { |
---|
127 | 115 | .name = "atmel_flexcom", |
---|
128 | | - .pm = &atmel_flexcom_pm_ops, |
---|
| 116 | + .pm = pm_ptr(&atmel_flexcom_pm_ops), |
---|
129 | 117 | .of_match_table = atmel_flexcom_of_match, |
---|
130 | 118 | }, |
---|
131 | 119 | }; |
---|