forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/w1/w1_int.c
....@@ -1,15 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) 2004 Evgeniy Polyakov <zbr@ioremap.net>
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
134 */
145
156 #include <linux/kernel.h>
....@@ -60,10 +51,9 @@
6051 dev->search_count = w1_search_count;
6152 dev->enable_pullup = w1_enable_pullup;
6253
63
- /* 1 for w1_process to decrement
64
- * 1 for __w1_remove_master_device to decrement
54
+ /* For __w1_remove_master_device to decrement
6555 */
66
- atomic_set(&dev->refcnt, 2);
56
+ atomic_set(&dev->refcnt, 1);
6757
6858 INIT_LIST_HEAD(&dev->slist);
6959 INIT_LIST_HEAD(&dev->async_list);