aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nubus/nubus.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2013-04-10 10:05:38 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-29 15:41:54 -0400
commit11db656ad462c9aa7aff7e3817214578cfc307b3 (patch)
tree02b536ede231d4f1f5c51030ff6a2691c1759921 /drivers/nubus/nubus.c
parent77cd02c151cb6b7d81aad4802ee8b98a033863d6 (diff)
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 <dhowells@redhat.com> cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/nubus/nubus.c')
-rw-r--r--drivers/nubus/nubus.c55
1 files changed, 0 insertions, 55 deletions
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 @@
19#include <asm/setup.h> 19#include <asm/setup.h>
20#include <asm/page.h> 20#include <asm/page.h>
21#include <asm/hwtest.h> 21#include <asm/hwtest.h>
22#include <linux/proc_fs.h>
23#include <asm/mac_via.h> 22#include <asm/mac_via.h>
24#include <asm/mac_oss.h> 23#include <asm/mac_oss.h>
25 24
@@ -954,56 +953,6 @@ void __init nubus_probe_slot(int slot)
954 } 953 }
955} 954}
956 955
957#if defined(CONFIG_PROC_FS)
958
959/* /proc/nubus stuff */
960
961static int sprint_nubus_board(struct nubus_board* board, char* ptr, int len)
962{
963 if(len < 100)
964 return -1;
965
966 sprintf(ptr, "Slot %X: %s\n",
967 board->slot, board->name);
968
969 return strlen(ptr);
970}
971
972static int nubus_read_proc(char *page, char **start, off_t off,
973 int count, int *eof, void *data)
974{
975 int nprinted, len, begin = 0;
976 int size = PAGE_SIZE;
977 struct nubus_board* board;
978
979 len = sprintf(page, "Nubus devices found:\n");
980 /* Walk the list of NuBus boards */
981 for (board = nubus_boards; board != NULL; board = board->next)
982 {
983 nprinted = sprint_nubus_board(board, page + len, size - len);
984 if (nprinted < 0)
985 break;
986 len += nprinted;
987 if (len+begin < off) {
988 begin += len;
989 len = 0;
990 }
991 if (len+begin >= off+count)
992 break;
993 }
994 if (len+begin < off)
995 *eof = 1;
996 off -= begin;
997 *start = page + off;
998 len -= off;
999 if (len>count)
1000 len = count;
1001 if (len<0)
1002 len = 0;
1003 return len;
1004}
1005#endif
1006
1007void __init nubus_scan_bus(void) 956void __init nubus_scan_bus(void)
1008{ 957{
1009 int slot; 958 int slot;
@@ -1041,11 +990,7 @@ static int __init nubus_init(void)
1041 nubus_devices = NULL; 990 nubus_devices = NULL;
1042 nubus_boards = NULL; 991 nubus_boards = NULL;
1043 nubus_scan_bus(); 992 nubus_scan_bus();
1044
1045#ifdef CONFIG_PROC_FS
1046 create_proc_read_entry("nubus", 0, NULL, nubus_read_proc, NULL);
1047 nubus_proc_init(); 993 nubus_proc_init();
1048#endif
1049 return 0; 994 return 0;
1050} 995}
1051 996