hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/mfd/wm831x-i2c.c
....@@ -1,19 +1,14 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * wm831x-i2c.c -- I2C access for Wolfson WM831x PMICs
34 *
45 * Copyright 2009,2010 Wolfson Microelectronics PLC.
56 *
67 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of the GNU General Public License as published by the
10
- * Free Software Foundation; either version 2 of the License, or (at your
11
- * option) any later version.
12
- *
138 */
149
1510 #include <linux/kernel.h>
16
-#include <linux/module.h>
11
+#include <linux/init.h>
1712 #include <linux/i2c.h>
1813 #include <linux/delay.h>
1914 #include <linux/mfd/core.h>
....@@ -68,15 +63,6 @@
6863 return wm831x_device_init(wm831x, i2c->irq);
6964 }
7065
71
-static int wm831x_i2c_remove(struct i2c_client *i2c)
72
-{
73
- struct wm831x *wm831x = i2c_get_clientdata(i2c);
74
-
75
- wm831x_device_exit(wm831x);
76
-
77
- return 0;
78
-}
79
-
8066 static int wm831x_i2c_suspend(struct device *dev)
8167 {
8268 struct wm831x *wm831x = dev_get_drvdata(dev);
....@@ -103,7 +89,6 @@
10389 { "wm8326", WM8326 },
10490 { }
10591 };
106
-MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id);
10792
10893 static const struct dev_pm_ops wm831x_pm_ops = {
10994 .suspend = wm831x_i2c_suspend,
....@@ -115,9 +100,9 @@
115100 .name = "wm831x",
116101 .pm = &wm831x_pm_ops,
117102 .of_match_table = of_match_ptr(wm831x_of_match),
103
+ .suppress_bind_attrs = true,
118104 },
119105 .probe = wm831x_i2c_probe,
120
- .remove = wm831x_i2c_remove,
121106 .id_table = wm831x_i2c_id,
122107 };
123108
....@@ -132,9 +117,3 @@
132117 return ret;
133118 }
134119 subsys_initcall(wm831x_i2c_init);
135
-
136
-static void __exit wm831x_i2c_exit(void)
137
-{
138
- i2c_del_driver(&wm831x_i2c_driver);
139
-}
140
-module_exit(wm831x_i2c_exit);