| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Battery charger driver for Dialog Semiconductor DA9030 |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2008 Compulab, Ltd. |
|---|
| 5 | 6 | * 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. |
|---|
| 10 | 7 | */ |
|---|
| 11 | 8 | |
|---|
| 12 | 9 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 175 | 172 | return 0; |
|---|
| 176 | 173 | } |
|---|
| 177 | 174 | |
|---|
| 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); |
|---|
| 189 | 176 | |
|---|
| 190 | 177 | static struct dentry *da9030_bat_create_debugfs(struct da9030_charger *charger) |
|---|
| 191 | 178 | { |
|---|