proc.c (dca3a783400a18e2bf4503b1d4a85c4d0ca1a7e4) proc.c (d9dda78bad879595d8c4220a067fc029d6484a16)
1/*
2 * Procfs interface for the Zorro bus.
3 *
4 * Copyright (C) 1998-2003 Geert Uytterhoeven
5 *
6 * Heavily based on the procfs interface for the PCI bus, which is
7 *
8 * Copyright (C) 1997, 1998 Martin Mares <mj@atrey.karlin.mff.cuni.cz>

--- 33 unchanged lines hidden (view full) ---

42 file->f_pos = new;
43 mutex_unlock(&inode->i_mutex);
44 return new;
45}
46
47static ssize_t
48proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
49{
1/*
2 * Procfs interface for the Zorro bus.
3 *
4 * Copyright (C) 1998-2003 Geert Uytterhoeven
5 *
6 * Heavily based on the procfs interface for the PCI bus, which is
7 *
8 * Copyright (C) 1997, 1998 Martin Mares <mj@atrey.karlin.mff.cuni.cz>

--- 33 unchanged lines hidden (view full) ---

42 file->f_pos = new;
43 mutex_unlock(&inode->i_mutex);
44 return new;
45}
46
47static ssize_t
48proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
49{
50 struct inode *ino = file_inode(file);
51 struct proc_dir_entry *dp = PDE(ino);
52 struct zorro_dev *z = dp->data;
50 struct zorro_dev *z = PDE_DATA(file_inode(file));
53 struct ConfigDev cd;
54 loff_t pos = *ppos;
55
56 if (pos >= sizeof(struct ConfigDev))
57 return 0;
58 if (nbytes >= sizeof(struct ConfigDev))
59 nbytes = sizeof(struct ConfigDev);
60 if (pos + nbytes > sizeof(struct ConfigDev))

--- 102 unchanged lines hidden ---
51 struct ConfigDev cd;
52 loff_t pos = *ppos;
53
54 if (pos >= sizeof(struct ConfigDev))
55 return 0;
56 if (nbytes >= sizeof(struct ConfigDev))
57 nbytes = sizeof(struct ConfigDev);
58 if (pos + nbytes > sizeof(struct ConfigDev))

--- 102 unchanged lines hidden ---