aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuobin Huang <huangguobin4@huawei.com>2021-04-06 20:06:37 +0800
committerBjorn Helgaas <bhelgaas@google.com>2021-04-14 15:24:10 -0500
commit3a306a5b60165a79c963585ac1863a12bba0ae7e (patch)
tree75d84c1f3d6cf94cbeeee8307a695b4b0569bfd7
parentACPI / hotplug / PCI: Fix reference count leak in enable_slot() (diff)
downloadlinux-dev-3a306a5b60165a79c963585ac1863a12bba0ae7e.tar.xz
linux-dev-3a306a5b60165a79c963585ac1863a12bba0ae7e.zip
PCI: cpqphp: Use DEFINE_SPINLOCK() for int15_lock
Initialize the static int15_lock spinlock with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Link: https://lore.kernel.org/r/1617710797-48903-1-git-send-email-huangguobin4@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Guobin Huang <huangguobin4@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--drivers/pci/hotplug/cpqphp_nvram.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c
index 00cd2b43364f..7a65d427ac11 100644
--- a/drivers/pci/hotplug/cpqphp_nvram.c
+++ b/drivers/pci/hotplug/cpqphp_nvram.c
@@ -80,7 +80,7 @@ static u8 evbuffer[1024];
static void __iomem *compaq_int15_entry_point;
/* lock for ordering int15_bios_call() */
-static spinlock_t int15_lock;
+static DEFINE_SPINLOCK(int15_lock);
/* This is a series of function that deals with
@@ -415,9 +415,6 @@ void compaq_nvram_init(void __iomem *rom_start)
compaq_int15_entry_point = (rom_start + ROM_INT15_PHY_ADDR - ROM_PHY_ADDR);
dbg("int15 entry = %p\n", compaq_int15_entry_point);
-
- /* initialize our int15 lock */
- spin_lock_init(&int15_lock);
}