]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/bridge/br_sysfs_br.c
[ARM] S3C2440: Merge branch next-mini2440 into next-s3c
[mv-sheeva.git] / net / bridge / br_sysfs_br.c
index 158dee8b4965307c045d6fec2d5a930070a4cd68..ee4820aa1843ee5e54c1b677f4cd5875a440d442 100644 (file)
@@ -22,7 +22,7 @@
 #include "br_private.h"
 
 #define to_dev(obj)    container_of(obj, struct device, kobj)
-#define to_bridge(cd)  ((struct net_bridge *)(to_net_dev(cd)->priv))
+#define to_bridge(cd)  ((struct net_bridge *)netdev_priv(to_net_dev(cd)))
 
 /*
  * Common code for storing bridge parameters.
@@ -172,7 +172,8 @@ static ssize_t store_stp_state(struct device *d,
        if (endp == buf)
                return -EINVAL;
 
-       rtnl_lock();
+       if (!rtnl_trylock())
+               return restart_syscall();
        br_stp_set_enabled(br, val);
        rtnl_unlock();