proc.c (da733563be5a9da26fe81d9f007262d00b846e22) | proc.c (496ad9aa8ef448058e36ca7a787c61f2e63f0f54) |
---|---|
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> --- 8 unchanged lines hidden (view full) --- 17#include <asm/uaccess.h> 18#include <asm/amigahw.h> 19#include <asm/setup.h> 20 21static loff_t 22proc_bus_zorro_lseek(struct file *file, loff_t off, int whence) 23{ 24 loff_t new = -1; | 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> --- 8 unchanged lines hidden (view full) --- 17#include <asm/uaccess.h> 18#include <asm/amigahw.h> 19#include <asm/setup.h> 20 21static loff_t 22proc_bus_zorro_lseek(struct file *file, loff_t off, int whence) 23{ 24 loff_t new = -1; |
25 struct inode *inode = file->f_path.dentry->d_inode; | 25 struct inode *inode = file_inode(file); |
26 27 mutex_lock(&inode->i_mutex); 28 switch (whence) { 29 case 0: 30 new = off; 31 break; 32 case 1: 33 new = file->f_pos + off; --- 8 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{ | 26 27 mutex_lock(&inode->i_mutex); 28 switch (whence) { 29 case 0: 30 new = off; 31 break; 32 case 1: 33 new = file->f_pos + off; --- 8 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->f_path.dentry->d_inode; | 50 struct inode *ino = file_inode(file); |
51 struct proc_dir_entry *dp = PDE(ino); 52 struct zorro_dev *z = dp->data; 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)) --- 104 unchanged lines hidden --- | 51 struct proc_dir_entry *dp = PDE(ino); 52 struct zorro_dev *z = dp->data; 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)) --- 104 unchanged lines hidden --- |