Root/target/linux/omap24xx/patches-2.6.38/531-cbus-retu-wdt-fix-bitfield.patch

1--- a/drivers/cbus/retu-wdt.c
2+++ b/drivers/cbus/retu-wdt.c
3@@ -56,7 +56,7 @@ static int counter_param = RETU_WDT_MAX_
4 
5 struct retu_wdt_dev {
6     struct device *dev;
7- int users;
8+ unsigned long users;
9     struct miscdevice retu_wdt_miscdev;
10     struct delayed_work ping_work;
11 };
12@@ -161,7 +161,7 @@ static DEVICE_ATTR(counter, S_IRUGO, ret
13 
14 static int retu_wdt_open(struct inode *inode, struct file *file)
15 {
16- if (test_and_set_bit(1, (unsigned long *)&(retu_wdt->users)))
17+ if (test_and_set_bit(0, &retu_wdt->users))
18         return -EBUSY;
19 
20     file->private_data = (void *)retu_wdt;
21@@ -177,7 +177,7 @@ static int retu_wdt_release(struct inode
22 #ifndef CONFIG_WATCHDOG_NOWAYOUT
23     retu_wdt_ping_enable(retu_wdt);
24 #endif
25- wdev->users = 0;
26+ clear_bit(0, &retu_wdt->users);
27 
28     return 0;
29 }
30@@ -264,7 +264,6 @@ static int __init retu_wdt_probe(struct
31         return -ENOMEM;
32 
33     wdev->dev = &pdev->dev;
34- wdev->users = 0;
35 
36     ret = device_create_file(&pdev->dev, &dev_attr_period);
37     if (ret) {
38

Archive Download this file



interactive