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

clocksource/drivers/h8300_*: Remove unneeded memset()s

Memory for timer16_priv, timer8_priv and tpu_priv structs is
allocated by devm_kzalloc() in corresponding probe functions
of drivers.
No need to zero it one more time.
Signed-off-by: NAlexey Klimov <alexey.klimov@linaro.org>
Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
上级 6eeb8c35
...@@ -153,7 +153,6 @@ static int timer16_setup(struct timer16_priv *p, struct platform_device *pdev) ...@@ -153,7 +153,6 @@ static int timer16_setup(struct timer16_priv *p, struct platform_device *pdev)
int ret, irq; int ret, irq;
unsigned int ch; unsigned int ch;
memset(p, 0, sizeof(*p));
p->pdev = pdev; p->pdev = pdev;
res[REG_CH] = platform_get_resource(p->pdev, res[REG_CH] = platform_get_resource(p->pdev,
......
...@@ -215,7 +215,6 @@ static int timer8_setup(struct timer8_priv *p, ...@@ -215,7 +215,6 @@ static int timer8_setup(struct timer8_priv *p,
int irq; int irq;
int ret; int ret;
memset(p, 0, sizeof(*p));
p->pdev = pdev; p->pdev = pdev;
res = platform_get_resource(p->pdev, IORESOURCE_MEM, 0); res = platform_get_resource(p->pdev, IORESOURCE_MEM, 0);
......
...@@ -123,7 +123,6 @@ static int __init tpu_setup(struct tpu_priv *p, struct platform_device *pdev) ...@@ -123,7 +123,6 @@ static int __init tpu_setup(struct tpu_priv *p, struct platform_device *pdev)
{ {
struct resource *res[2]; struct resource *res[2];
memset(p, 0, sizeof(*p));
p->pdev = pdev; p->pdev = pdev;
res[CH_L] = platform_get_resource(p->pdev, IORESOURCE_MEM, CH_L); res[CH_L] = platform_get_resource(p->pdev, IORESOURCE_MEM, CH_L);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册