Skip to content

Commit 73cac03

Browse files
committed
Pull watchdog fixes from Wim Van Sebroeck: "This will fix a deadlock on the ts72xx_wdt driver, fix bitmasks in the kempld_wdt driver and fix a section mismatch in the sunxi_wdt driver" * git://www.linux-watchdog.org/linux-watchdog: watchdog: sunxi: Fix section mismatch watchdog: kempld_wdt: Fix bit mask definition watchdog: ts72xx_wdt: locking bug in ioctl
2 parents 3552570 + 1d5898b commit 73cac03

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

drivers/watchdog/kempld_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#define KEMPLD_WDT_STAGE_TIMEOUT(x) (0x1b + (x) * 4)
3636
#define KEMPLD_WDT_STAGE_CFG(x) (0x18 + (x))
3737
#define STAGE_CFG_GET_PRESCALER(x) (((x) & 0x30) >> 4)
38-
#define STAGE_CFG_SET_PRESCALER(x) (((x) & 0x30) << 4)
38+
#define STAGE_CFG_SET_PRESCALER(x) (((x) & 0x3) << 4)
3939
#define STAGE_CFG_PRESCALER_MASK 0x30
4040
#define STAGE_CFG_ACTION_MASK 0x7
4141
#define STAGE_CFG_ASSERT (1 << 3)

drivers/watchdog/sunxi_wdt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static const struct watchdog_ops sunxi_wdt_ops = {
146146
.set_timeout = sunxi_wdt_set_timeout,
147147
};
148148

149-
static int __init sunxi_wdt_probe(struct platform_device *pdev)
149+
static int sunxi_wdt_probe(struct platform_device *pdev)
150150
{
151151
struct sunxi_wdt_dev *sunxi_wdt;
152152
struct resource *res;
@@ -187,7 +187,7 @@ static int __init sunxi_wdt_probe(struct platform_device *pdev)
187187
return 0;
188188
}
189189

190-
static int __exit sunxi_wdt_remove(struct platform_device *pdev)
190+
static int sunxi_wdt_remove(struct platform_device *pdev)
191191
{
192192
struct sunxi_wdt_dev *sunxi_wdt = platform_get_drvdata(pdev);
193193

drivers/watchdog/ts72xx_wdt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ static long ts72xx_wdt_ioctl(struct file *file, unsigned int cmd,
310310

311311
case WDIOC_GETSTATUS:
312312
case WDIOC_GETBOOTSTATUS:
313-
return put_user(0, p);
313+
error = put_user(0, p);
314+
break;
314315

315316
case WDIOC_KEEPALIVE:
316317
ts72xx_wdt_kick(wdt);

0 commit comments

Comments
 (0)