patch-2.4.20 linux-2.4.20/drivers/net/sk98lin/skge.c
Next file: linux-2.4.20/drivers/net/slip.c
Previous file: linux-2.4.20/drivers/net/sis900.h
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Thu Nov 28 15:53:14 2002
- Orig file:
linux-2.4.19/drivers/net/sk98lin/skge.c
- Orig date:
Fri Aug 2 17:39:44 2002
diff -urN linux-2.4.19/drivers/net/sk98lin/skge.c linux-2.4.20/drivers/net/sk98lin/skge.c
@@ -404,6 +404,7 @@
*/
static int __init skge_probe (void)
{
+ int proc_root_initialized = 0;
int boards_found = 0;
int version_disp = 0;
SK_AC *pAC;
@@ -429,11 +430,6 @@
if (!pci_present()) /* is PCI support present? */
return -ENODEV;
- pSkRootDir = create_proc_entry("sk98lin",
- S_IFDIR | S_IWUSR | S_IRUGO | S_IXUGO, proc_net);
-
- pSkRootDir->owner = THIS_MODULE;
-
while((pdev = pci_find_device(PCI_VENDOR_ID_SYSKONNECT,
PCI_DEVICE_ID_SYSKONNECT_GE, pdev)) != NULL) {
@@ -485,6 +481,14 @@
dev->do_ioctl = &SkGeIoctl;
dev->change_mtu = &SkGeChangeMtu;
+ if(!proc_root_initialized) {
+ pSkRootDir = create_proc_entry("sk98lin",
+ S_IFDIR | S_IWUSR | S_IRUGO | S_IXUGO, proc_net);
+ pSkRootDir->owner = THIS_MODULE;
+
+ proc_root_initialized = 1;
+ }
+
pProcFile = create_proc_entry(dev->name,
S_IFREG | 0444, pSkRootDir);
pProcFile->read_proc = proc_read;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)