]> rtime.felk.cvut.cz Git - socketcan-devel.git/commitdiff
Use simple_stroul() and correct variable type instead of a misplaced
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Tue, 7 Oct 2008 12:47:41 +0000 (12:47 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Tue, 7 Oct 2008 12:47:41 +0000 (12:47 +0000)
strict_stroul(). This also allows compilation on older Kernels than 2.6.25.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@835 030b6a49-0b11-0410-94ab-b0dab22257f2

kernel/2.6/drivers/net/can/softing/softing_main.c

index b00588694f3f684456385ab9704047fe2d382a43..fa597b96423045581568bfc20c2250b1f2353a6a 100644 (file)
 
 #include "softing.h"
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
-       /* clear statistics */
-#define strict_strtoul simple_strtoul
-#endif
 /* this is the worst thing on the softing API
  * 2 busses are driven together, I don't know how
  * to recover a single of them.
@@ -808,7 +804,7 @@ static ssize_t store_output(struct device *dev
        struct softing_priv *priv = netdev2softing(ndev);
        struct softing *card = priv->card;
 
-       int v = strict_strtol(buf, 0, 0);
+       u8 v = simple_strtoul(buf, NULL, 10) & 0xFFU;
 
        if (mutex_lock_interruptible(&card->fw.lock))
                return -ERESTARTSYS;