From 11db656ad462c9aa7aff7e3817214578cfc307b3 Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 10 Apr 2013 15:05:38 +0100 Subject: nubus: Don't use create_proc_read_entry() Don't use create_proc_read_entry() as that is deprecated, but rather use proc_create_data() and seq_file instead. Signed-off-by: David Howells cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Al Viro --- drivers/nubus/nubus.c | 55 --------------------------------------------------- 1 file changed, 55 deletions(-) (limited to 'drivers/nubus/nubus.c') diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c index 44d01afafe9c..43926cd25ae8 100644 --- a/drivers/nubus/nubus.c +++ b/drivers/nubus/nubus.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -954,56 +953,6 @@ void __init nubus_probe_slot(int slot) } } -#if defined(CONFIG_PROC_FS) - -/* /proc/nubus stuff */ - -static int sprint_nubus_board(struct nubus_board* board, char* ptr, int len) -{ - if(len < 100) - return -1; - - sprintf(ptr, "Slot %X: %s\n", - board->slot, board->name); - - return strlen(ptr); -} - -static int nubus_read_proc(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int nprinted, len, begin = 0; - int size = PAGE_SIZE; - struct nubus_board* board; - - len = sprintf(page, "Nubus devices found:\n"); - /* Walk the list of NuBus boards */ - for (board = nubus_boards; board != NULL; board = board->next) - { - nprinted = sprint_nubus_board(board, page + len, size - len); - if (nprinted < 0) - break; - len += nprinted; - if (len+begin < off) { - begin += len; - len = 0; - } - if (len+begin >= off+count) - break; - } - if (len+begin < off) - *eof = 1; - off -= begin; - *start = page + off; - len -= off; - if (len>count) - len = count; - if (len<0) - len = 0; - return len; -} -#endif - void __init nubus_scan_bus(void) { int slot; @@ -1041,11 +990,7 @@ static int __init nubus_init(void) nubus_devices = NULL; nubus_boards = NULL; nubus_scan_bus(); - -#ifdef CONFIG_PROC_FS - create_proc_read_entry("nubus", 0, NULL, nubus_read_proc, NULL); nubus_proc_init(); -#endif return 0; } -- cgit v1.2.3-59-g8ed1b