hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mfd/atmel-flexcom.c
....@@ -1,21 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Driver for Atmel Flexcom
34 *
45 * Copyright (C) 2015 Atmel Corporation
56 *
67 * 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/>.
198 */
209
2110 #include <linux/module.h>
....@@ -98,8 +87,7 @@
9887 };
9988 MODULE_DEVICE_TABLE(of, atmel_flexcom_of_match);
10089
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)
10391 {
10492 struct atmel_flexcom *ddata = dev_get_drvdata(dev);
10593 int err;
....@@ -116,16 +104,16 @@
116104
117105 return 0;
118106 }
119
-#endif
120107
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
+};
123111
124112 static struct platform_driver atmel_flexcom_driver = {
125113 .probe = atmel_flexcom_probe,
126114 .driver = {
127115 .name = "atmel_flexcom",
128
- .pm = &atmel_flexcom_pm_ops,
116
+ .pm = pm_ptr(&atmel_flexcom_pm_ops),
129117 .of_match_table = atmel_flexcom_of_match,
130118 },
131119 };