]> rtime.felk.cvut.cz Git - linux-lin.git/blobdiff - sllin/sllin.c
sllin: remove block local variable where function wide one is available.
[linux-lin.git] / sllin / sllin.c
index b2580f184b382308b3007254e390dfcac28db154..2088794e4ccbeb5a779c3095e719a2e90cf71d70 100644 (file)
@@ -101,15 +101,15 @@ MODULE_AUTHOR("Pavel Pisa <pisa@cmp.felk.cvut.cz>");
 static bool master = true;
 static int baudrate; /* Use LIN_DEFAULT_BAUDRATE when not set */
 
-module_param(master, bool, 0);
+module_param(master, bool, 0444);
 MODULE_PARM_DESC(master, "LIN interface is Master device");
-module_param(baudrate, int, 0);
+module_param(baudrate, int, 0444);
 MODULE_PARM_DESC(baudrate, "Baudrate of LIN interface");
 
 static int maxdev = 10;                /* MAX number of SLLIN channels;
                                   This can be overridden with
                                   insmod sllin.ko maxdev=nnn   */
-module_param(maxdev, int, 0);
+module_param(maxdev, int, 0444);
 MODULE_PARM_DESC(maxdev, "Maximum number of sllin interfaces");
 
 /* maximum buffer len to store whole LIN message*/
@@ -1252,8 +1252,6 @@ static int sllin_kwthread(void *ptr)
 
                        /* SFF RTR CAN frame -> LIN header */
                        if (cf->can_id & CAN_RTR_FLAG) {
-                               struct sllin_conf_entry *sce;
-
                                netdev_dbg(sl->dev, "%s: RTR SFF CAN frame, ID = %x\n",
                                        __func__, cf->can_id & LIN_ID_MASK);
 
@@ -1284,8 +1282,6 @@ static int sllin_kwthread(void *ptr)
                                spin_unlock_irqrestore(&sl->linfr_lock, flags);
 
                        } else { /* SFF NON-RTR CAN frame -> LIN header + LIN response */
-                               struct sllin_conf_entry *sce;
-
                                netdev_dbg(sl->dev, "%s: NON-RTR SFF CAN frame, ID = %x\n",
                                        __func__, (int)cf->can_id & LIN_ID_MASK);