hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/power/supply/da9030_battery.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Battery charger driver for Dialog Semiconductor DA9030
34 *
45 * Copyright (C) 2008 Compulab, Ltd.
56 * Mike Rapoport <mike@compulab.co.il>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118
129 #include <linux/kernel.h>
....@@ -175,17 +172,7 @@
175172 return 0;
176173 }
177174
178
-static int debug_open(struct inode *inode, struct file *file)
179
-{
180
- return single_open(file, bat_debug_show, inode->i_private);
181
-}
182
-
183
-static const struct file_operations bat_debug_fops = {
184
- .open = debug_open,
185
- .read = seq_read,
186
- .llseek = seq_lseek,
187
- .release = single_release,
188
-};
175
+DEFINE_SHOW_ATTRIBUTE(bat_debug);
189176
190177 static struct dentry *da9030_bat_create_debugfs(struct da9030_charger *charger)
191178 {