omap24xx: Set hardware watchdog timeout to max
[openwrt.git] / target / linux / omap24xx / patches-2.6.38 / 531-cbus-retu-wdt-fix-bitfield.patch
1 Index: linux-2.6.38-rc6/drivers/cbus/retu-wdt.c
2 ===================================================================
3 --- linux-2.6.38-rc6.orig/drivers/cbus/retu-wdt.c       2011-03-02 16:46:24.574676092 +0100
4 +++ linux-2.6.38-rc6/drivers/cbus/retu-wdt.c    2011-03-02 16:48:17.469807413 +0100
5 @@ -56,7 +56,7 @@ static int counter_param = RETU_WDT_MAX_
6  
7  struct retu_wdt_dev {
8         struct device           *dev;
9 -       int                     users;
10 +       unsigned long           users;
11         struct miscdevice       retu_wdt_miscdev;
12         struct delayed_work     ping_work;
13  };
14 @@ -161,7 +161,7 @@ static DEVICE_ATTR(counter, S_IRUGO, ret
15  
16  static int retu_wdt_open(struct inode *inode, struct file *file)
17  {
18 -       if (test_and_set_bit(1, (unsigned long *)&(retu_wdt->users)))
19 +       if (test_and_set_bit(0, &retu_wdt->users))
20                 return -EBUSY;
21  
22         file->private_data = (void *)retu_wdt;
23 @@ -177,7 +177,7 @@ static int retu_wdt_release(struct inode
24  #ifndef CONFIG_WATCHDOG_NOWAYOUT
25         retu_wdt_ping_enable(retu_wdt);
26  #endif
27 -       wdev->users = 0;
28 +       clear_bit(0, &retu_wdt->users);
29  
30         return 0;
31  }
32 @@ -264,7 +264,6 @@ static int __init retu_wdt_probe(struct
33                 return -ENOMEM;
34  
35         wdev->dev = &pdev->dev;
36 -       wdev->users = 0;
37  
38         ret = device_create_file(&pdev->dev, &dev_attr_period);
39         if (ret) {