MIPS: NILE4: Remove odd locking in PCI config space access code
Caller (generic PCI code) already do proper locking so no need to add another one here. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Cc: Linux MIPS <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/7600/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
856839b768
commit
6ff9c2fcfa
1 changed files with 1 additions and 11 deletions
|
@ -13,8 +13,6 @@
|
||||||
|
|
||||||
volatile unsigned long *const vrc_pciregs = (void *) Vrc5074_BASE;
|
volatile unsigned long *const vrc_pciregs = (void *) Vrc5074_BASE;
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(nile4_pci_lock);
|
|
||||||
|
|
||||||
static int nile4_pcibios_config_access(unsigned char access_type,
|
static int nile4_pcibios_config_access(unsigned char access_type,
|
||||||
struct pci_bus *bus, unsigned int devfn, int where, u32 *val)
|
struct pci_bus *bus, unsigned int devfn, int where, u32 *val)
|
||||||
{
|
{
|
||||||
|
@ -76,7 +74,6 @@ static int nile4_pcibios_config_access(unsigned char access_type,
|
||||||
static int nile4_pcibios_read(struct pci_bus *bus, unsigned int devfn,
|
static int nile4_pcibios_read(struct pci_bus *bus, unsigned int devfn,
|
||||||
int where, int size, u32 *val)
|
int where, int size, u32 *val)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
|
||||||
u32 data = 0;
|
u32 data = 0;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
@ -85,11 +82,8 @@ static int nile4_pcibios_read(struct pci_bus *bus, unsigned int devfn,
|
||||||
else if ((size == 4) && (where & 3))
|
else if ((size == 4) && (where & 3))
|
||||||
return PCIBIOS_BAD_REGISTER_NUMBER;
|
return PCIBIOS_BAD_REGISTER_NUMBER;
|
||||||
|
|
||||||
spin_lock_irqsave(&nile4_pci_lock, flags);
|
|
||||||
err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where,
|
err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where,
|
||||||
&data);
|
&data);
|
||||||
spin_unlock_irqrestore(&nile4_pci_lock, flags);
|
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -106,7 +100,6 @@ static int nile4_pcibios_read(struct pci_bus *bus, unsigned int devfn,
|
||||||
static int nile4_pcibios_write(struct pci_bus *bus, unsigned int devfn,
|
static int nile4_pcibios_write(struct pci_bus *bus, unsigned int devfn,
|
||||||
int where, int size, u32 val)
|
int where, int size, u32 val)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
|
||||||
u32 data = 0;
|
u32 data = 0;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
@ -115,11 +108,8 @@ static int nile4_pcibios_write(struct pci_bus *bus, unsigned int devfn,
|
||||||
else if ((size == 4) && (where & 3))
|
else if ((size == 4) && (where & 3))
|
||||||
return PCIBIOS_BAD_REGISTER_NUMBER;
|
return PCIBIOS_BAD_REGISTER_NUMBER;
|
||||||
|
|
||||||
spin_lock_irqsave(&nile4_pci_lock, flags);
|
|
||||||
err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where,
|
err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where,
|
||||||
&data);
|
&data);
|
||||||
spin_unlock_irqrestore(&nile4_pci_lock, flags);
|
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue