can: j1939: j1939_sk_bind(): return failure if netdev is down
[linux-2.6-microblaze.git] / net / can / proc.c
index a4eb06c..5ea8695 100644 (file)
@@ -54,7 +54,6 @@
  * proc filenames for the PF_CAN core
  */
 
-#define CAN_PROC_VERSION     "version"
 #define CAN_PROC_STATS       "stats"
 #define CAN_PROC_RESET_STATS "reset_stats"
 #define CAN_PROC_RCVLIST_ALL "rcvlist_all"
@@ -293,12 +292,6 @@ static int can_reset_stats_proc_show(struct seq_file *m, void *v)
        return 0;
 }
 
-static int can_version_proc_show(struct seq_file *m, void *v)
-{
-       seq_printf(m, "%s\n", CAN_VERSION_STRING);
-       return 0;
-}
-
 static inline void can_rcvlist_proc_show_one(struct seq_file *m, int idx,
                                             struct net_device *dev,
                                             struct can_dev_rcv_lists *dev_rcv_lists)
@@ -441,8 +434,6 @@ void can_init_proc(struct net *net)
        }
 
        /* own procfs entries from the AF_CAN core */
-       net->can.pde_version = proc_create_net_single(CAN_PROC_VERSION, 0644,
-                       net->can.proc_dir, can_version_proc_show, NULL);
        net->can.pde_stats = proc_create_net_single(CAN_PROC_STATS, 0644,
                        net->can.proc_dir, can_stats_proc_show, NULL);
        net->can.pde_reset_stats = proc_create_net_single(CAN_PROC_RESET_STATS,
@@ -471,8 +462,8 @@ void can_init_proc(struct net *net)
  */
 void can_remove_proc(struct net *net)
 {
-       if (net->can.pde_version)
-               remove_proc_entry(CAN_PROC_VERSION, net->can.proc_dir);
+       if (!net->can.proc_dir)
+               return;
 
        if (net->can.pde_stats)
                remove_proc_entry(CAN_PROC_STATS, net->can.proc_dir);
@@ -498,6 +489,5 @@ void can_remove_proc(struct net *net)
        if (net->can.pde_rcvlist_sff)
                remove_proc_entry(CAN_PROC_RCVLIST_SFF, net->can.proc_dir);
 
-       if (net->can.proc_dir)
-               remove_proc_entry("can", net->proc_net);
+       remove_proc_entry("can", net->proc_net);
 }