Skip to content

Commit

Permalink
PNP: pnpbios: Use DEFINE_SPINLOCK() for spinlock
Browse files Browse the repository at this point in the history
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().

Signed-off-by: Zheng Yongjun <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
Zheng Yongjun authored and rafaeljw committed Jan 22, 2021
1 parent b1f4213 commit 9622822
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pnp/pnpbios/bioscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ __visible u32 pnp_bios_fault_esp;
__visible u32 pnp_bios_fault_eip;
__visible u32 pnp_bios_is_utter_crap = 0;

static spinlock_t pnp_bios_lock;
static DEFINE_SPINLOCK(pnp_bios_lock);

/*
* Support Functions
Expand Down Expand Up @@ -473,7 +473,6 @@ void pnpbios_calls_init(union pnp_bios_install_struct *header)
{
int i;

spin_lock_init(&pnp_bios_lock);
pnp_bios_callpoint.offset = header->fields.pm16offset;
pnp_bios_callpoint.segment = PNP_CS16;

Expand Down

0 comments on commit 9622822

Please sign in to comment.