aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sk98lin/skge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sk98lin/skge.c')
-rw-r--r--drivers/net/sk98lin/skge.c42
1 files changed, 1 insertions, 41 deletions
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
index 8338d4972500..e3bdb5836001 100644
--- a/drivers/net/sk98lin/skge.c
+++ b/drivers/net/sk98lin/skge.c
@@ -110,7 +110,6 @@
110#include <linux/module.h> 110#include <linux/module.h>
111#include <linux/moduleparam.h> 111#include <linux/moduleparam.h>
112#include <linux/init.h> 112#include <linux/init.h>
113#include <linux/proc_fs.h>
114#include <linux/dma-mapping.h> 113#include <linux/dma-mapping.h>
115#include <linux/ip.h> 114#include <linux/ip.h>
116 115
@@ -234,28 +233,6 @@ static int SkDrvDeInitAdapter(SK_AC *pAC, int devNbr);
234 * Extern Function Prototypes 233 * Extern Function Prototypes
235 * 234 *
236 ******************************************************************************/ 235 ******************************************************************************/
237static const char SKRootName[] = "net/sk98lin";
238static struct proc_dir_entry *pSkRootDir;
239extern struct file_operations sk_proc_fops;
240
241static inline void SkGeProcCreate(struct net_device *dev)
242{
243 struct proc_dir_entry *pe;
244
245 if (pSkRootDir &&
246 (pe = create_proc_entry(dev->name, S_IRUGO, pSkRootDir))) {
247 pe->proc_fops = &sk_proc_fops;
248 pe->data = dev;
249 pe->owner = THIS_MODULE;
250 }
251}
252
253static inline void SkGeProcRemove(struct net_device *dev)
254{
255 if (pSkRootDir)
256 remove_proc_entry(dev->name, pSkRootDir);
257}
258
259extern void SkDimEnableModerationIfNeeded(SK_AC *pAC); 236extern void SkDimEnableModerationIfNeeded(SK_AC *pAC);
260extern void SkDimDisplayModerationSettings(SK_AC *pAC); 237extern void SkDimDisplayModerationSettings(SK_AC *pAC);
261extern void SkDimStartModerationTimer(SK_AC *pAC); 238extern void SkDimStartModerationTimer(SK_AC *pAC);
@@ -4898,8 +4875,6 @@ static int __devinit skge_probe_one(struct pci_dev *pdev,
4898 memcpy(&dev->dev_addr, &pAC->Addr.Net[0].CurrentMacAddress, 6); 4875 memcpy(&dev->dev_addr, &pAC->Addr.Net[0].CurrentMacAddress, 6);
4899 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 4876 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
4900 4877
4901 SkGeProcCreate(dev);
4902
4903 pNet->PortNr = 0; 4878 pNet->PortNr = 0;
4904 pNet->NetNr = 0; 4879 pNet->NetNr = 0;
4905 4880
@@ -4947,7 +4922,6 @@ static int __devinit skge_probe_one(struct pci_dev *pdev,
4947 free_netdev(dev); 4922 free_netdev(dev);
4948 pAC->dev[1] = pAC->dev[0]; 4923 pAC->dev[1] = pAC->dev[0];
4949 } else { 4924 } else {
4950 SkGeProcCreate(dev);
4951 memcpy(&dev->dev_addr, 4925 memcpy(&dev->dev_addr,
4952 &pAC->Addr.Net[1].CurrentMacAddress, 6); 4926 &pAC->Addr.Net[1].CurrentMacAddress, 6);
4953 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 4927 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
@@ -4988,10 +4962,7 @@ static void __devexit skge_remove_one(struct pci_dev *pdev)
4988 SK_AC *pAC = pNet->pAC; 4962 SK_AC *pAC = pNet->pAC;
4989 struct net_device *otherdev = pAC->dev[1]; 4963 struct net_device *otherdev = pAC->dev[1];
4990 4964
4991 SkGeProcRemove(dev);
4992 unregister_netdev(dev); 4965 unregister_netdev(dev);
4993 if (otherdev != dev)
4994 SkGeProcRemove(otherdev);
4995 4966
4996 SkGeYellowLED(pAC, pAC->IoBase, 0); 4967 SkGeYellowLED(pAC, pAC->IoBase, 0);
4997 4968
@@ -5136,23 +5107,12 @@ static struct pci_driver skge_driver = {
5136 5107
5137static int __init skge_init(void) 5108static int __init skge_init(void)
5138{ 5109{
5139 int error; 5110 return pci_module_init(&skge_driver);
5140
5141 pSkRootDir = proc_mkdir(SKRootName, NULL);
5142 if (pSkRootDir)
5143 pSkRootDir->owner = THIS_MODULE;
5144
5145 error = pci_register_driver(&skge_driver);
5146 if (error)
5147 remove_proc_entry(SKRootName, NULL);
5148 return error;
5149} 5111}
5150 5112
5151static void __exit skge_exit(void) 5113static void __exit skge_exit(void)
5152{ 5114{
5153 pci_unregister_driver(&skge_driver); 5115 pci_unregister_driver(&skge_driver);
5154 remove_proc_entry(SKRootName, NULL);
5155
5156} 5116}
5157 5117
5158module_init(skge_init); 5118module_init(skge_init);