diff options
Diffstat (limited to 'drivers/staging/unisys/visorutil/visorkmodutils.c')
-rw-r--r-- | drivers/staging/unisys/visorutil/visorkmodutils.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/drivers/staging/unisys/visorutil/visorkmodutils.c b/drivers/staging/unisys/visorutil/visorkmodutils.c index 10d77cb6ee97..d6815f9e1337 100644 --- a/drivers/staging/unisys/visorutil/visorkmodutils.c +++ b/drivers/staging/unisys/visorutil/visorkmodutils.c @@ -46,46 +46,6 @@ void *kmalloc_kernel(size_t siz) return kmalloc(siz, GFP_KERNEL | __GFP_NORETRY); } -/* Use these handy-dandy seq_file_xxx functions if you want to call some - * functions that write stuff into a seq_file, but you actually just want - * to dump that output into a buffer. Use them as follows: - * - call visor_seq_file_new_buffer to create the seq_file (you supply the buf) - * - call whatever functions you want that take a seq_file as an argument - * (the buf you supplied will get the output data) - * - call visor_seq_file_done_buffer to dispose of your seq_file - */ -struct seq_file *visor_seq_file_new_buffer(void *buf, size_t buf_size) -{ - struct seq_file *rc = NULL; - struct seq_file *m = kmalloc_kernel(sizeof(struct seq_file)); - - if (m == NULL) { - rc = NULL; - goto Away; - } - memset(m, 0, sizeof(struct seq_file)); - m->buf = buf; - m->size = buf_size; - rc = m; -Away: - if (rc == NULL) { - visor_seq_file_done_buffer(m); - m = NULL; - } - return rc; -} -EXPORT_SYMBOL_GPL(visor_seq_file_new_buffer); - - - -void visor_seq_file_done_buffer(struct seq_file *m) -{ - if (!m) - return; - kfree(m); -} -EXPORT_SYMBOL_GPL(visor_seq_file_done_buffer); - static __init uint32_t visorutil_spar_detect(void) { |