Source
1086
1086
size += buf_obj->size;
1087
1087
mutex_unlock(&buf_obj->lock);
1088
1088
}
1089
1089
1090
1090
seq_printf(s, "\nTotal %d objects, %zu bytes\n", count, size);
1091
1091
1092
1092
mutex_unlock(&db_list.lock);
1093
1093
return 0;
1094
1094
}
1095
1095
1096
-
static int dma_buf_debug_open(struct inode *inode, struct file *file)
1097
-
{
1098
-
return single_open(file, dma_buf_debug_show, NULL);
1099
-
}
1100
-
1101
-
static const struct file_operations dma_buf_debug_fops = {
1102
-
.open = dma_buf_debug_open,
1103
-
.read = seq_read,
1104
-
.llseek = seq_lseek,
1105
-
.release = single_release,
1106
-
};
1096
+
DEFINE_SHOW_ATTRIBUTE(dma_buf_debug);
1107
1097
1108
1098
static struct dentry *dma_buf_debugfs_dir;
1109
1099
1110
1100
static int dma_buf_init_debugfs(void)
1111
1101
{
1112
1102
struct dentry *d;
1113
1103
int err = 0;
1114
1104
1115
1105
d = debugfs_create_dir("dma_buf", NULL);
1116
1106
if (IS_ERR(d))