patch-2.3.25 linux/arch/arm/mm/fault-armv.c

Next file: linux/arch/arm/mm/fault-common.c
Previous file: linux/arch/arm/kernel/traps.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.24/linux/arch/arm/mm/fault-armv.c linux/arch/arm/mm/fault-armv.c
@@ -90,6 +90,7 @@
 static unsigned long ai_word;
 static unsigned long ai_multi;
 
+#ifdef CONFIG_SYSCTL
 static int proc_alignment_read(char *page, char **start, off_t off,
 			       int count, int *eof, void *data)
 {
@@ -113,23 +114,18 @@
 	return len;
 }
 
-#ifdef CONFIG_SYSCTL
 /*
  * This needs to be done after sysctl_init, otherwise sys/
  * will be overwritten.
  */
 void __init alignment_init(void)
 {
-	struct proc_dir_entry *e;
-
-	e = create_proc_entry("sys/debug/alignment", S_IFREG | S_IRUGO, NULL);
-
-	if (e)
-		e->read_proc = proc_alignment_read;
+	create_proc_read_entry("sys/debug/alignment", 0, NULL,
+				proc_alignment_read);
 }
 
 __initcall(alignment_init);
-#endif
+#endif /* CONFIG_SYSCTL */
 
 static int
 do_alignment_exception(struct pt_regs *regs)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)