git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
pci
/
proc.c
diff --git
a/drivers/pci/proc.c
b/drivers/pci/proc.c
index
54b2ebc
..
4a6760a
100644
(file)
--- a/
drivers/pci/proc.c
+++ b/
drivers/pci/proc.c
@@
-23,7
+23,7
@@
static loff_t
proc_bus_pci_lseek(struct file *file, loff_t off, int whence)
{
loff_t new = -1;
proc_bus_pci_lseek(struct file *file, loff_t off, int whence)
{
loff_t new = -1;
- struct inode *inode = file->f_dentry->d_inode;
+ struct inode *inode = file->f_
path.
dentry->d_inode;
mutex_lock(&inode->i_mutex);
switch (whence) {
mutex_lock(&inode->i_mutex);
switch (whence) {
@@
-48,7
+48,7
@@
proc_bus_pci_lseek(struct file *file, loff_t off, int whence)
static ssize_t
proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
{
static ssize_t
proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
{
- const struct inode *ino = file->f_dentry->d_inode;
+ const struct inode *ino = file->f_
path.
dentry->d_inode;
const struct proc_dir_entry *dp = PDE(ino);
struct pci_dev *dev = dp->data;
unsigned int pos = *ppos;
const struct proc_dir_entry *dp = PDE(ino);
struct pci_dev *dev = dp->data;
unsigned int pos = *ppos;
@@
-130,7
+130,7
@@
proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp
static ssize_t
proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos)
{
static ssize_t
proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos)
{
- const struct inode *ino = file->f_dentry->d_inode;
+ const struct inode *ino = file->f_
path.
dentry->d_inode;
const struct proc_dir_entry *dp = PDE(ino);
struct pci_dev *dev = dp->data;
int pos = *ppos;
const struct proc_dir_entry *dp = PDE(ino);
struct pci_dev *dev = dp->data;
int pos = *ppos;
@@
-245,7
+245,7
@@
static int proc_bus_pci_ioctl(struct inode *inode, struct file *file, unsigned i
#ifdef HAVE_PCI_MMAP
static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma)
{
#ifdef HAVE_PCI_MMAP
static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma)
{
- struct inode *inode = file->f_dentry->d_inode;
+ struct inode *inode = file->f_
path.
dentry->d_inode;
const struct proc_dir_entry *dp = PDE(inode);
struct pci_dev *dev = dp->data;
struct pci_filp_private *fpriv = file->private_data;
const struct proc_dir_entry *dp = PDE(inode);
struct pci_dev *dev = dp->data;
struct pci_filp_private *fpriv = file->private_data;
@@
-302,12
+302,6
@@
static struct file_operations proc_bus_pci_operations = {
#endif /* HAVE_PCI_MMAP */
};
#endif /* HAVE_PCI_MMAP */
};
-#if BITS_PER_LONG == 32
-#define LONG_FORMAT "\t%08lx"
-#else
-#define LONG_FORMAT "\t%16lx"
-#endif
-
/* iterator */
static void *pci_seq_start(struct seq_file *m, loff_t *pos)
{
/* iterator */
static void *pci_seq_start(struct seq_file *m, loff_t *pos)
{
@@
-356,18
+350,18
@@
static int show_device(struct seq_file *m, void *v)
dev->irq);
/* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */
for (i=0; i<7; i++) {
dev->irq);
/* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */
for (i=0; i<7; i++) {
-
u64
start, end;
+
resource_size_t
start, end;
pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
- seq_printf(m,
LONG_FORMAT
,
- (
(unsigned long)start)
|
- (dev->resource[i].flags & PCI_REGION_FLAG_MASK));
+ seq_printf(m,
"\t%16llx"
,
+ (
unsigned long long)(start
|
+ (dev->resource[i].flags & PCI_REGION_FLAG_MASK))
)
;
}
for (i=0; i<7; i++) {
}
for (i=0; i<7; i++) {
-
u64
start, end;
+
resource_size_t
start, end;
pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
- seq_printf(m,
LONG_FORMAT
,
+ seq_printf(m,
"\t%16llx"
,
dev->resource[i].start < dev->resource[i].end ?
dev->resource[i].start < dev->resource[i].end ?
- (unsigned long)(end - start) + 1 : 0);
+ (unsigned long
long
)(end - start) + 1 : 0);
}
seq_putc(m, '\t');
if (drv)
}
seq_putc(m, '\t');
if (drv)