+/* write our message to the sequential file */
+static int hello_show(struct seq_file *file, void *data)
+{
+ seq_puts(file, "Hello, world!\n");
+ return 0;
+}
+
+/* use the single sequential file */
+static int hello_procfs_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, hello_show, NULL);
+}
+
+/* our file operations use the seq_file stuff to make it an easy task */
+static const struct file_operations hello_procfs_fops =
+{
+ .open = hello_procfs_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
+};
+