hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/coh901327_wdt.c
....@@ -6,7 +6,7 @@
66 * Watchdog driver for the ST-Ericsson AB COH 901 327 IP core
77 * Author: Linus Walleij <linus.walleij@stericsson.com>
88 */
9
-#include <linux/module.h>
9
+#include <linux/moduleparam.h>
1010 #include <linux/mod_devicetable.h>
1111 #include <linux/types.h>
1212 #include <linux/watchdog.h>
....@@ -243,27 +243,15 @@
243243 .timeout = U300_WDOG_DEFAULT_TIMEOUT,
244244 };
245245
246
-static int __exit coh901327_remove(struct platform_device *pdev)
247
-{
248
- watchdog_unregister_device(&coh901327_wdt);
249
- coh901327_disable();
250
- free_irq(irq, pdev);
251
- clk_disable_unprepare(clk);
252
- clk_put(clk);
253
- return 0;
254
-}
255
-
256246 static int __init coh901327_probe(struct platform_device *pdev)
257247 {
258248 struct device *dev = &pdev->dev;
259249 int ret;
260250 u16 val;
261
- struct resource *res;
262251
263252 parent = dev;
264253
265
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
266
- virtbase = devm_ioremap_resource(dev, res);
254
+ virtbase = devm_platform_ioremap_resource(pdev, 0);
267255 if (IS_ERR(virtbase))
268256 return PTR_ERR(virtbase);
269257
....@@ -408,19 +396,13 @@
408396 .driver = {
409397 .name = "coh901327_wdog",
410398 .of_match_table = coh901327_dt_match,
399
+ .suppress_bind_attrs = true,
411400 },
412
- .remove = __exit_p(coh901327_remove),
413401 .suspend = coh901327_suspend,
414402 .resume = coh901327_resume,
415403 };
404
+builtin_platform_driver_probe(coh901327_driver, coh901327_probe);
416405
417
-module_platform_driver_probe(coh901327_driver, coh901327_probe);
418
-
419
-MODULE_AUTHOR("Linus Walleij <linus.walleij@stericsson.com>");
420
-MODULE_DESCRIPTION("COH 901 327 Watchdog");
421
-
406
+/* not really modular, but ... */
422407 module_param(margin, uint, 0);
423408 MODULE_PARM_DESC(margin, "Watchdog margin in seconds (default 60s)");
424
-
425
-MODULE_LICENSE("GPL v2");
426
-MODULE_ALIAS("platform:coh901327-watchdog");