Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

watchdog: s3c2410: Minor code cleanup

Cleanup the code from minor readability issues (no functional changes):
1. Fix checkpatch: ERROR: Do not include the paragraph about writing to
the Free Software Foundation's mailing address.
2. Fix checkpatch: WARNING: quoted string split across lines
3. Fix chechpatch: WARNING: Prefer 'unsigned int' to bare use of
'unsigned'
4. Use 'dev' consistently in probe function instead of mixing dev with
&pdev->dev.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

authored by

Krzysztof Kozlowski and committed by
Wim Van Sebroeck
08497f22 a9a02c46

+13 -22
+13 -22
drivers/watchdog/s3c2410_wdt.c
··· 1 - /* linux/drivers/char/watchdog/s3c2410_wdt.c 2 - * 1 + /* 3 2 * Copyright (c) 2004 Simtec Electronics 4 3 * Ben Dooks <ben@simtec.co.uk> 5 4 * ··· 16 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 19 * GNU General Public License for more details. 19 - * 20 - * You should have received a copy of the GNU General Public License 21 - * along with this program; if not, write to the Free Software 22 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 - */ 20 + */ 24 21 25 22 #include <linux/module.h> 26 23 #include <linux/moduleparam.h> ··· 90 95 __MODULE_STRING(S3C2410_WATCHDOG_ATBOOT)); 91 96 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" 92 97 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 93 - MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, " 94 - "0 to reboot (default 0)"); 98 + MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, 0 to reboot (default 0)"); 95 99 96 100 /** 97 101 * struct s3c2410_wdt_variant - Per-variant config data ··· 305 311 return readl(wdt->reg_base + S3C2410_WTCON) & S3C2410_WTCON_ENABLE; 306 312 } 307 313 308 - static int s3c2410wdt_set_heartbeat(struct watchdog_device *wdd, unsigned timeout) 314 + static int s3c2410wdt_set_heartbeat(struct watchdog_device *wdd, 315 + unsigned int timeout) 309 316 { 310 317 struct s3c2410_wdt *wdt = watchdog_get_drvdata(wdd); 311 318 unsigned long freq = clk_get_rate(wdt->clock); ··· 520 525 521 526 static int s3c2410wdt_probe(struct platform_device *pdev) 522 527 { 523 - struct device *dev; 528 + struct device *dev = &pdev->dev; 524 529 struct s3c2410_wdt *wdt; 525 530 struct resource *wdt_mem; 526 531 struct resource *wdt_irq; ··· 528 533 int started = 0; 529 534 int ret; 530 535 531 - dev = &pdev->dev; 532 - 533 536 wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); 534 537 if (!wdt) 535 538 return -ENOMEM; 536 539 537 - wdt->dev = &pdev->dev; 540 + wdt->dev = dev; 538 541 spin_lock_init(&wdt->lock); 539 542 wdt->wdt_device = s3c2410_wdd; 540 543 ··· 588 595 /* see if we can actually set the requested timer margin, and if 589 596 * not, try the default value */ 590 597 591 - watchdog_init_timeout(&wdt->wdt_device, tmr_margin, &pdev->dev); 598 + watchdog_init_timeout(&wdt->wdt_device, tmr_margin, dev); 592 599 ret = s3c2410wdt_set_heartbeat(&wdt->wdt_device, 593 600 wdt->wdt_device.timeout); 594 601 if (ret) { ··· 597 604 598 605 if (started == 0) 599 606 dev_info(dev, 600 - "tmr_margin value out of range, default %d used\n", 601 - S3C2410_WATCHDOG_DEFAULT_TIME); 607 + "tmr_margin value out of range, default %d used\n", 608 + S3C2410_WATCHDOG_DEFAULT_TIME); 602 609 else 603 - dev_info(dev, "default timer value is out of range, " 604 - "cannot start\n"); 610 + dev_info(dev, "default timer value is out of range, cannot start\n"); 605 611 } 606 612 607 613 ret = devm_request_irq(dev, wdt_irq->start, s3c2410wdt_irq, 0, ··· 614 622 watchdog_set_restart_priority(&wdt->wdt_device, 128); 615 623 616 624 wdt->wdt_device.bootstatus = s3c2410wdt_get_bootstatus(wdt); 617 - wdt->wdt_device.parent = &pdev->dev; 625 + wdt->wdt_device.parent = dev; 618 626 619 627 ret = watchdog_register_device(&wdt->wdt_device); 620 628 if (ret) { ··· 749 757 750 758 module_platform_driver(s3c2410wdt_driver); 751 759 752 - MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>, " 753 - "Dimitry Andric <dimitry.andric@tomtom.com>"); 760 + MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>, Dimitry Andric <dimitry.andric@tomtom.com>"); 754 761 MODULE_DESCRIPTION("S3C2410 Watchdog Device Driver"); 755 762 MODULE_LICENSE("GPL");