clocksource/drivers/h8300_*: Remove unneeded memset()s
authorAlexey Klimov <alexey.klimov@linaro.org>
Thu, 10 Sep 2015 00:38:21 +0000 (03:38 +0300)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 15 Oct 2015 15:42:02 +0000 (17:42 +0200)
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: Alexey Klimov <alexey.klimov@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/h8300_timer16.c
drivers/clocksource/h8300_timer8.c
drivers/clocksource/h8300_tpu.c

index 82941c1e9e33f0d098ae4b0b7273fa263c3b9ce0..0e076c6fc006b26b52729c9389db7d87a9604ce3 100644 (file)
@@ -153,7 +153,6 @@ static int timer16_setup(struct timer16_priv *p, struct platform_device *pdev)
        int ret, irq;
        unsigned int ch;
 
-       memset(p, 0, sizeof(*p));
        p->pdev = pdev;
 
        res[REG_CH] = platform_get_resource(p->pdev,
index f9b3b7033a970acfdc21c7503ec34326e6042748..44375d8b9bc438878be58699fb95ce8fb624ebc6 100644 (file)
@@ -215,7 +215,6 @@ static int timer8_setup(struct timer8_priv *p,
        int irq;
        int ret;
 
-       memset(p, 0, sizeof(*p));
        p->pdev = pdev;
 
        res = platform_get_resource(p->pdev, IORESOURCE_MEM, 0);
index 64195fdd78bf78e90a1f3c264a1e88716b6c7f25..5487410bfabb93b0c4768a91870485f6ba77d31f 100644 (file)
@@ -123,7 +123,6 @@ static int __init tpu_setup(struct tpu_priv *p, struct platform_device *pdev)
 {
        struct resource *res[2];
 
-       memset(p, 0, sizeof(*p));
        p->pdev = pdev;
 
        res[CH_L] = platform_get_resource(p->pdev, IORESOURCE_MEM, CH_L);