summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorAlexey Klimov <alexey.klimov@arm.com>2017-07-12 11:59:48 +0100
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-07-31 00:17:46 +0200
commit319ff835d6136842c660011047a480119bd7cba8 (patch)
tree3bfbd123b9881a1f71b6f823bf0e9332ce43db4b /drivers/rtc
parent11909f0be799585f606a70b7e0a9541736848a2e (diff)
downloadlinux-stable-319ff835d6136842c660011047a480119bd7cba8.tar.gz
linux-stable-319ff835d6136842c660011047a480119bd7cba8.tar.bz2
linux-stable-319ff835d6136842c660011047a480119bd7cba8.zip
rtc: sun6i: Remove double init of spinlock in sun6i_rtc_clk_init()
Remove double init of spinlock in sun6i_rtc_clk_init() Fixes: 847b8bf62eb4 ("rtc: sun6i: Expose the 32kHz oscillator") Signed-off-by: Alexey Klimov <alexey.klimov@arm.com> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-sun6i.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c
index 39cbc1238b92..7e7da604682b 100644
--- a/drivers/rtc/rtc-sun6i.c
+++ b/drivers/rtc/rtc-sun6i.c
@@ -193,12 +193,12 @@ static void __init sun6i_rtc_clk_init(struct device_node *node)
rtc = kzalloc(sizeof(*rtc), GFP_KERNEL);
if (!rtc)
return;
- spin_lock_init(&rtc->lock);
clk_data = kzalloc(sizeof(*clk_data) + sizeof(*clk_data->hws),
GFP_KERNEL);
if (!clk_data)
return;
+
spin_lock_init(&rtc->lock);
rtc->base = of_io_request_and_map(node, 0, of_node_full_name(node));