]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/blobdiff - kernel/res_counter.c
res_counter: delete res_counter_write()
[can-eth-gw-linux.git] / kernel / res_counter.c
index ad581aa2369a2ed8f925c395b2b4eadd9d8640f2..3920d593e63c7d86acfcc07f1caa1443a065ffb1 100644 (file)
@@ -192,25 +192,3 @@ int res_counter_memparse_write_strategy(const char *buf,
        *res = PAGE_ALIGN(*res);
        return 0;
 }
-
-int res_counter_write(struct res_counter *counter, int member,
-                     const char *buf, write_strategy_fn write_strategy)
-{
-       char *end;
-       unsigned long flags;
-       unsigned long long tmp, *val;
-
-       if (write_strategy) {
-               if (write_strategy(buf, &tmp))
-                       return -EINVAL;
-       } else {
-               tmp = simple_strtoull(buf, &end, 10);
-               if (*end != '\0')
-                       return -EINVAL;
-       }
-       spin_lock_irqsave(&counter->lock, flags);
-       val = res_counter_member(counter, member);
-       *val = tmp;
-       spin_unlock_irqrestore(&counter->lock, flags);
-       return 0;
-}