提交 fdbd1310 编写于 作者: A Alexey Klimov 提交者: Daniel Lezcano

clocksource/drivers/em_sti: Remove unneeded memset()s

Memory for cs and ced fields in struct em_sti_priv is allocated
by devm_kzalloc() in the beginning of em_sti_probe() so they
don't need to be zeroed one more time in
em_sti_register_clocksource() and in em_sti_register_clockevent().
Signed-off-by: NAlexey Klimov <alexey.klimov@linaro.org>
Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
上级 f14665f6
...@@ -228,7 +228,6 @@ static int em_sti_register_clocksource(struct em_sti_priv *p) ...@@ -228,7 +228,6 @@ static int em_sti_register_clocksource(struct em_sti_priv *p)
{ {
struct clocksource *cs = &p->cs; struct clocksource *cs = &p->cs;
memset(cs, 0, sizeof(*cs));
cs->name = dev_name(&p->pdev->dev); cs->name = dev_name(&p->pdev->dev);
cs->rating = 200; cs->rating = 200;
cs->read = em_sti_clocksource_read; cs->read = em_sti_clocksource_read;
...@@ -285,7 +284,6 @@ static void em_sti_register_clockevent(struct em_sti_priv *p) ...@@ -285,7 +284,6 @@ static void em_sti_register_clockevent(struct em_sti_priv *p)
{ {
struct clock_event_device *ced = &p->ced; struct clock_event_device *ced = &p->ced;
memset(ced, 0, sizeof(*ced));
ced->name = dev_name(&p->pdev->dev); ced->name = dev_name(&p->pdev->dev);
ced->features = CLOCK_EVT_FEAT_ONESHOT; ced->features = CLOCK_EVT_FEAT_ONESHOT;
ced->rating = 200; ced->rating = 200;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册