Commit 45c6c873 authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Wolfram Sang

i2c: busses: Use DEFINE_SPINLOCK() for spinlock

spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 9d64834b
...@@ -49,7 +49,7 @@ static int mmapped; ...@@ -49,7 +49,7 @@ static int mmapped;
static wait_queue_head_t pcf_wait; static wait_queue_head_t pcf_wait;
static int pcf_pending; static int pcf_pending;
static spinlock_t lock; static DEFINE_SPINLOCK(lock);
static struct i2c_adapter pcf_isa_ops; static struct i2c_adapter pcf_isa_ops;
...@@ -132,7 +132,6 @@ static irqreturn_t pcf_isa_handler(int this_irq, void *dev_id) { ...@@ -132,7 +132,6 @@ static irqreturn_t pcf_isa_handler(int this_irq, void *dev_id) {
static int pcf_isa_init(void) static int pcf_isa_init(void)
{ {
spin_lock_init(&lock);
if (!mmapped) { if (!mmapped) {
if (!request_region(base, 2, pcf_isa_ops.name)) { if (!request_region(base, 2, pcf_isa_ops.name)) {
printk(KERN_ERR "%s: requested I/O region (%#x:2) is " printk(KERN_ERR "%s: requested I/O region (%#x:2) is "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment