forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/w1/slaves/w1_ds2805.c
....@@ -1,10 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * w1_ds2805 - w1 family 0d (DS28E05) driver
34 *
45 * Copyright (c) 2016 Andrew Worsley amworsley@gmail.com
5
- *
6
- * This source code is licensed under the GNU General Public License,
7
- * Version 2. See the file COPYING for more details.
86 */
97
108 #include <linux/kernel.h>
....@@ -283,12 +281,12 @@
283281 sysfs_remove_bin_file(&sl->dev.kobj, &w1_f0d_bin_attr);
284282 }
285283
286
-static struct w1_family_ops w1_f0d_fops = {
284
+static const struct w1_family_ops w1_f0d_fops = {
287285 .add_slave = w1_f0d_add_slave,
288286 .remove_slave = w1_f0d_remove_slave,
289287 };
290288
291
-static struct w1_family w1_family_2d = {
289
+static struct w1_family w1_family_0d = {
292290 .fid = W1_EEPROM_DS2805,
293291 .fops = &w1_f0d_fops,
294292 };
....@@ -296,13 +294,13 @@
296294 static int __init w1_f0d_init(void)
297295 {
298296 pr_info("%s()\n", __func__);
299
- return w1_register_family(&w1_family_2d);
297
+ return w1_register_family(&w1_family_0d);
300298 }
301299
302300 static void __exit w1_f0d_fini(void)
303301 {
304302 pr_info("%s()\n", __func__);
305
- w1_unregister_family(&w1_family_2d);
303
+ w1_unregister_family(&w1_family_0d);
306304 }
307305
308306 module_init(w1_f0d_init);