Skip to content

Commit

Permalink
memory: emif: 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 <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20201228135056.28511-1-zhengyongjun3@huawei.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
  • Loading branch information
Zheng Yongjun authored and krzk committed Jan 3, 2021
1 parent a2d522f commit bd96a89
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/memory/emif.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct emif_data {
};

static struct emif_data *emif1;
static spinlock_t emif_lock;
static DEFINE_SPINLOCK(emif_lock);
static unsigned long irq_state;
static u32 t_ck; /* DDR clock period in ps */
static LIST_HEAD(device_list);
Expand Down Expand Up @@ -1531,7 +1531,6 @@ static int __init_or_module emif_probe(struct platform_device *pdev)
/* One-time actions taken on probing the first device */
if (!emif1) {
emif1 = emif;
spin_lock_init(&emif_lock);

/*
* TODO: register notifiers for frequency and voltage
Expand Down

0 comments on commit bd96a89

Please sign in to comment.