Re: [PATCH v7 2/2] watchdog: mtk_wdt: mt8183: Add reset controller

From: Philipp Zabel
Date: Thu Jan 02 2020 - 06:56:56 EST


On Fri, 2019-12-27 at 17:04 +0800, Jiaxin Yu wrote:
> Add reset controller API in watchdog driver.
> Besides watchdog, MTK toprgu module alsa provide sub-system (eg, audio,
> camera, codec and connectivity) software reset functionality.
>
> Signed-off-by: yong.liang <yong.liang@xxxxxxxxxxxx>
> Signed-off-by: Jiaxin Yu <jiaxin.yu@xxxxxxxxxxxx>
> Reviewed-by: Yingjoe Chen <yingjoe.chen@xxxxxxxxxxxx>
> ---
> drivers/watchdog/mtk_wdt.c | 105 ++++++++++++++++++++++++++++++++++++-
> 1 file changed, 104 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
> index 9c3d0033260d..c1bc19ab628e 100644
> --- a/drivers/watchdog/mtk_wdt.c
> +++ b/drivers/watchdog/mtk_wdt.c
[...]
> @@ -155,6 +248,7 @@ static int mtk_wdt_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct mtk_wdt_dev *mtk_wdt;
> + struct mtk_wdt_data *wdt_data;
> int err;
>
> mtk_wdt = devm_kzalloc(dev, sizeof(*mtk_wdt), GFP_KERNEL);
> @@ -190,6 +284,13 @@ static int mtk_wdt_probe(struct platform_device *pdev)
> dev_info(dev, "Watchdog enabled (timeout=%d sec, nowayout=%d)\n",
> mtk_wdt->wdt_dev.timeout, nowayout);
>
> + wdt_data = (struct mtk_wdt_data *)of_device_get_match_data(dev);

The cast is not necessary, otherwise

Reviewed-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>

regards
Philipp