projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PCI: remove foolish code from pci-driver.c
[powerpc.git]
/
drivers
/
pci
/
proc.c
diff --git
a/drivers/pci/proc.c
b/drivers/pci/proc.c
index
0425a7b
..
716439e
100644
(file)
--- a/
drivers/pci/proc.c
+++ b/
drivers/pci/proc.c
@@
-11,7
+11,7
@@
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
-
+#include <linux/capability.h>
#include <asm/uaccess.h>
#include <asm/byteorder.h>
#include "pci.h"
#include <asm/uaccess.h>
#include <asm/byteorder.h>
#include "pci.h"
@@
-60,7
+60,7
@@
proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp
*/
if (capable(CAP_SYS_ADMIN))
*/
if (capable(CAP_SYS_ADMIN))
- size = d
ev->cfg_
size;
+ size = d
p->
size;
else if (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
size = 128;
else
else if (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
size = 128;
else
@@
-129,11
+129,11
@@
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_path.dentry->d_inode;
+ 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;
- int size = d
ev->cfg_
size;
+ int size = d
p->
size;
int cnt;
if (pos >= size)
int cnt;
if (pos >= size)
@@
-193,6
+193,7
@@
proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof
}
*ppos = pos;
}
*ppos = pos;
+ i_size_write(ino, dp->size);
return nbytes;
}
return nbytes;
}
@@
-480,7
+481,6
@@
static int __init pci_proc_init(void)
__initcall(pci_proc_init);
#ifdef CONFIG_HOTPLUG
__initcall(pci_proc_init);
#ifdef CONFIG_HOTPLUG
-EXPORT_SYMBOL(pci_proc_attach_device);
EXPORT_SYMBOL(pci_proc_detach_bus);
#endif
EXPORT_SYMBOL(pci_proc_detach_bus);
#endif