*/
#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
#include <linux/init.h>
#include <asm/uaccess.h>
-------------------------------------------------------------------------- */
static int
-acpi_system_read_info (struct seq_file *seq, void *offset)
+acpi_system_read_info (
+ char *page,
+ char **start,
+ off_t off,
+ int count,
+ int *eof,
+ void *data)
{
+ char *p = page;
+ int size = 0;
+
ACPI_FUNCTION_TRACE("acpi_system_read_info");
- seq_printf(seq, "version: %x\n", ACPI_CA_VERSION);
- return_VALUE(0);
-}
+ if (off != 0)
+ goto end;
-static int acpi_system_info_open_fs(struct inode *inode, struct file *file)
-{
- return single_open(file, acpi_system_read_info, PDE(inode)->data);
-}
+ p += sprintf(p, "version: %x\n", ACPI_CA_VERSION);
-static struct file_operations acpi_system_info_ops = {
- .open = acpi_system_info_open_fs,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+end:
+ size = (p - page);
+ if (size <= off+count) *eof = 1;
+ *start = page + off;
+ size -= off;
+ if (size>count) size = count;
+ if (size<0) size = 0;
+
+ return_VALUE(size);
+}
static ssize_t acpi_system_read_dsdt (struct file*, char __user *, size_t, loff_t*);
/* 'info' [R] */
name = ACPI_SYSTEM_FILE_INFO;
- entry = create_proc_entry(name,
- S_IRUGO, acpi_root_dir);
+ entry = create_proc_read_entry(name,
+ S_IRUGO, acpi_root_dir, acpi_system_read_info,NULL);
if (!entry)
goto Error;
- else {
- entry->proc_fops = &acpi_system_info_ops;
- }
/* 'dsdt' [R] */
name = ACPI_SYSTEM_FILE_DSDT;