Message ID | 1441845501-10197-1-git-send-email-alexey.klimov@linaro.org |
---|---|
State | New |
Headers | show |
On 09/10/2015 02:38 AM, Alexey Klimov wrote: > 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: Alexey Klimov <alexey.klimov@linaro.org> > --- All patches of the series applied for 4.4 Thanks ! -- Daniel
diff --git a/drivers/clocksource/em_sti.c b/drivers/clocksource/em_sti.c index 7a97a34..19bb179 100644 --- a/drivers/clocksource/em_sti.c +++ b/drivers/clocksource/em_sti.c @@ -228,7 +228,6 @@ static int em_sti_register_clocksource(struct em_sti_priv *p) { struct clocksource *cs = &p->cs; - memset(cs, 0, sizeof(*cs)); cs->name = dev_name(&p->pdev->dev); cs->rating = 200; cs->read = em_sti_clocksource_read; @@ -285,7 +284,6 @@ static void em_sti_register_clockevent(struct em_sti_priv *p) { struct clock_event_device *ced = &p->ced; - memset(ced, 0, sizeof(*ced)); ced->name = dev_name(&p->pdev->dev); ced->features = CLOCK_EVT_FEAT_ONESHOT; ced->rating = 200;
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: Alexey Klimov <alexey.klimov@linaro.org> --- drivers/clocksource/em_sti.c | 2 -- 1 file changed, 2 deletions(-)