Lines Matching refs:dev
151 struct device *dev = &pdev->dev; in sp_wdt_probe() local
155 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); in sp_wdt_probe()
159 priv->clk = devm_clk_get(dev, NULL); in sp_wdt_probe()
161 return dev_err_probe(dev, PTR_ERR(priv->clk), "Failed to get clock\n"); in sp_wdt_probe()
165 return dev_err_probe(dev, ret, "Failed to enable clock\n"); in sp_wdt_probe()
167 ret = devm_add_action_or_reset(dev, sp_clk_disable_unprepare, priv->clk); in sp_wdt_probe()
172 priv->rstc = devm_reset_control_get_shared(dev, NULL); in sp_wdt_probe()
174 return dev_err_probe(dev, PTR_ERR(priv->rstc), "Failed to get reset\n"); in sp_wdt_probe()
178 ret = devm_add_action_or_reset(dev, sp_reset_control_assert, priv->rstc); in sp_wdt_probe()
191 priv->wdev.parent = dev; in sp_wdt_probe()
194 watchdog_init_timeout(&priv->wdev, timeout, dev); in sp_wdt_probe()
199 return devm_watchdog_register_device(dev, &priv->wdev); in sp_wdt_probe()