aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-10-05 18:44:22 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-10-05 18:44:22 +0000
commitbf3c267e3b0003ebfb707f82315ef9ec76175199 (patch)
tree1de51e89fa140a6025285b74dcdf64246003bf8d
parentcf60b056ecf2c805942956f822d6835b502c5956 (diff)
downloadmaster-187ad058-bf3c267e3b0003ebfb707f82315ef9ec76175199.tar.gz
master-187ad058-bf3c267e3b0003ebfb707f82315ef9ec76175199.tar.bz2
master-187ad058-bf3c267e3b0003ebfb707f82315ef9ec76175199.zip
ramips: convert 'config_access' function to void
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17919 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ramips/files/arch/mips/pci/pci-rt288x.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/target/linux/ramips/files/arch/mips/pci/pci-rt288x.c b/target/linux/ramips/files/arch/mips/pci/pci-rt288x.c
index e3b05d0610..e297419012 100644
--- a/target/linux/ramips/files/arch/mips/pci/pci-rt288x.c
+++ b/target/linux/ramips/files/arch/mips/pci/pci-rt288x.c
@@ -36,8 +36,8 @@ static void rt2880_pci_reg_write(u32 val, u32 reg)
writel(val, rt2880_pci_base + reg);
}
-static int config_access(unsigned char access_type, struct pci_bus *bus,
- unsigned int devfn, unsigned char where, u32 *data)
+static void config_access(unsigned char access_type, struct pci_bus *bus,
+ unsigned int devfn, unsigned char where, u32 *data)
{
unsigned int slot = PCI_SLOT(devfn);
unsigned int address;
@@ -51,8 +51,6 @@ static int config_access(unsigned char access_type, struct pci_bus *bus,
rt2880_pci_reg_write(*data, RT2880_PCI_REG_CONFIG_DATA);
else
*data = rt2880_pci_reg_read(RT2880_PCI_REG_CONFIG_DATA);
-
- return 0;
}
static int rt2880_pci_config_read(struct pci_bus *bus, unsigned int devfn,
@@ -60,8 +58,7 @@ static int rt2880_pci_config_read(struct pci_bus *bus, unsigned int devfn,
{
u32 data = 0;
- if (config_access(PCI_ACCESS_READ, bus, devfn, where, &data))
- return PCIBIOS_DEVICE_NOT_FOUND;
+ config_access(PCI_ACCESS_READ, bus, devfn, where, &data);
if (size == 1)
*val = (data >> ((where & 3) << 3)) & 0xff;
@@ -81,8 +78,7 @@ static int rt2880_pci_config_write(struct pci_bus *bus, unsigned int devfn,
if (size == 4) {
data = val;
} else {
- if (config_access(PCI_ACCESS_READ, bus, devfn, where, &data))
- return PCIBIOS_DEVICE_NOT_FOUND;
+ config_access(PCI_ACCESS_READ, bus, devfn, where, &data);
if (size == 1)
data = (data & ~(0xff << ((where & 3) << 3))) |
(val << ((where & 3) << 3));
@@ -91,8 +87,7 @@ static int rt2880_pci_config_write(struct pci_bus *bus, unsigned int devfn,
(val << ((where & 3) << 3));
}
- if (config_access(PCI_ACCESS_WRITE, bus, devfn, where, &data))
- return PCIBIOS_DEVICE_NOT_FOUND;
+ config_access(PCI_ACCESS_WRITE, bus, devfn, where, &data);
return PCIBIOS_SUCCESSFUL;
}