hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/mfd/wm8400-core.c
....@@ -1,18 +1,13 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Core driver for WM8400.
34 *
45 * Copyright 2008 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
9
- * modify it under the terms of the GNU General Public License as
10
- * published by the Free Software Foundation; either version 2 of the
11
- * License, or (at your option) any later version.
12
- *
138 */
149
15
-#include <linux/module.h>
10
+#include <linux/init.h>
1611 #include <linux/bug.h>
1712 #include <linux/err.h>
1813 #include <linux/i2c.h>
....@@ -34,12 +29,6 @@
3429 return false;
3530 }
3631 }
37
-
38
-int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data)
39
-{
40
- return regmap_bulk_read(wm8400->regmap, reg, data, count);
41
-}
42
-EXPORT_SYMBOL_GPL(wm8400_block_read);
4332
4433 static int wm8400_register_codec(struct wm8400 *wm8400)
4534 {
....@@ -119,6 +108,8 @@
119108 /**
120109 * wm8400_reset_codec_reg_cache - Reset cached codec registers to
121110 * their default values.
111
+ *
112
+ * @wm8400: pointer to local driver data structure
122113 */
123114 void wm8400_reset_codec_reg_cache(struct wm8400 *wm8400)
124115 {
....@@ -150,7 +141,6 @@
150141 { "wm8400", 0 },
151142 { }
152143 };
153
-MODULE_DEVICE_TABLE(i2c, wm8400_i2c_id);
154144
155145 static struct i2c_driver wm8400_i2c_driver = {
156146 .driver = {
....@@ -161,7 +151,7 @@
161151 };
162152 #endif
163153
164
-static int __init wm8400_module_init(void)
154
+static int __init wm8400_driver_init(void)
165155 {
166156 int ret = -ENODEV;
167157
....@@ -173,15 +163,4 @@
173163
174164 return ret;
175165 }
176
-subsys_initcall(wm8400_module_init);
177
-
178
-static void __exit wm8400_module_exit(void)
179
-{
180
-#if IS_ENABLED(CONFIG_I2C)
181
- i2c_del_driver(&wm8400_i2c_driver);
182
-#endif
183
-}
184
-module_exit(wm8400_module_exit);
185
-
186
-MODULE_LICENSE("GPL");
187
-MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
166
+subsys_initcall(wm8400_driver_init);