Skip to contentSkip to conversation

2.4.0-test13-pre2 has problems

PATCH Daiki Matsuda 1 participant 1 message Dec 16, 2000

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi, all.
I'm trying kernel 2.4.0-test13-pre2. But it has a problem in CONFIG_ATM.

In net/Config.in, we seletct CONFIG_ATM by bool, CONFIG_ATM_LANE and CONFIG_ATM_MPOA by tristate. But net/atm/common.c calls two function i.e. atm_lane_init and atm_mpoa_init, there also in net/atm/{lane_mpoa_init.c,mpoa_caches.c}. When CONFIG_ATM_LANE or CONFIG_ATM_MPOA is defined as module, the two functions are unreferenced. So, I will put a simple patch. But I feel its patch redundancy against two *.c files.

Regards
Daiki Matsuda

net/atm/common.c renamed from net/atm/common.c.old +4 -0
@@ -607,8 +607,10 @@
 #if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
                 case ATMLEC_CTRL:
                         if (!capable(CAP_NET_ADMIN)) return -EPERM;
+#ifndef CONFIG_ATM_LANE_MODULE
                         if (atm_lane_ops.lecd_attach == NULL)
                                 atm_lane_init();
+#endif
                         if (atm_lane_ops.lecd_attach == NULL) /* try again */
                                 return -ENOSYS;
                         error = atm_lane_ops.lecd_attach(vcc, (int)arg);
@@ -624,8 +626,10 @@
 #if defined(CONFIG_ATM_MPOA) || defined(CONFIG_ATM_MPOA_MODULE)
 		case ATMMPC_CTRL:
 			if (!capable(CAP_NET_ADMIN)) return -EPERM;
+#ifndef CONFIG_ATM_MPOA_MODULE
                         if (atm_mpoa_ops.mpoad_attach == NULL)
                                 atm_mpoa_init();
+#endif
                         if (atm_mpoa_ops.mpoad_attach == NULL) /* try again */
                                 return -ENOSYS;
                         error = atm_mpoa_ops.mpoad_attach(vcc, (int)arg);