Commit 43d8a6fd authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[SYSKONNECT]: /proc module handling fixup.

parent b4bfddcf
...@@ -348,12 +348,12 @@ static void PortReInitBmu(SK_AC*, int); ...@@ -348,12 +348,12 @@ static void PortReInitBmu(SK_AC*, int);
static int SkGeIocMib(DEV_NET*, unsigned int, int); static int SkGeIocMib(DEV_NET*, unsigned int, int);
/*Extern */ static const char SK_Root_Dir_entry[] = "sk98lin";
static struct proc_dir_entry *pSkRootDir;
extern struct proc_dir_entry *pSkRootDir;
//extern struct proc_dir_entry Our_Proc_Dir; //extern struct proc_dir_entry Our_Proc_Dir;
extern int proc_read(char *buffer, char **buffer_location, extern int sk_proc_read(char *buffer, char **buffer_location,
off_t offset, int buffer_length, int *eof, void *data); off_t offset, int buffer_length, int *eof, void *data);
...@@ -376,17 +376,6 @@ static uintptr_t TxQueueAddr[SK_MAX_MACS][2] = {{0x680, 0x600},{0x780, 0x700}}; ...@@ -376,17 +376,6 @@ static uintptr_t TxQueueAddr[SK_MAX_MACS][2] = {{0x680, 0x600},{0x780, 0x700}};
static uintptr_t RxQueueAddr[SK_MAX_MACS] = {0x400, 0x480}; static uintptr_t RxQueueAddr[SK_MAX_MACS] = {0x400, 0x480};
void proc_fill_inode(struct inode *inode, int fill)
{
if (fill)
MOD_INC_USE_COUNT;
else
MOD_DEC_USE_COUNT;
}
/***************************************************************************** /*****************************************************************************
* *
* skge_probe - find all SK-98xx adapters * skge_probe - find all SK-98xx adapters
...@@ -481,20 +470,20 @@ static int __init skge_probe (void) ...@@ -481,20 +470,20 @@ static int __init skge_probe (void)
dev->change_mtu = &SkGeChangeMtu; dev->change_mtu = &SkGeChangeMtu;
if(!proc_root_initialized) { if(!proc_root_initialized) {
pSkRootDir = create_proc_entry("sk98lin", pSkRootDir = create_proc_entry(SK_Root_Dir_entry,
S_IFDIR | S_IWUSR | S_IRUGO | S_IXUGO, proc_net); S_IFDIR | S_IWUSR | S_IRUGO | S_IXUGO, proc_net);
pSkRootDir->owner = THIS_MODULE; pSkRootDir->owner = THIS_MODULE;
proc_root_initialized = 1; proc_root_initialized = 1;
} }
pProcFile = create_proc_entry(dev->name, pProcFile = create_proc_entry(dev->name,
S_IFREG | 0444, pSkRootDir); S_IFREG | 0444, pSkRootDir);
pProcFile->read_proc = proc_read; pProcFile->read_proc = sk_proc_read;
pProcFile->write_proc = NULL; pProcFile->write_proc = NULL;
pProcFile->nlink = 1; pProcFile->nlink = 1;
pProcFile->size = sizeof(dev->name+1); pProcFile->size = sizeof(dev->name+1);
pProcFile->data = (void*)pProcFile; pProcFile->data = (void*)pProcFile;
pProcFile->owner = THIS_MODULE;
/* /*
* Dummy value. * Dummy value.
...@@ -571,11 +560,12 @@ static int __init skge_probe (void) ...@@ -571,11 +560,12 @@ static int __init skge_probe (void)
pProcFile = create_proc_entry(dev->name, pProcFile = create_proc_entry(dev->name,
S_IFREG | 0444, pSkRootDir); S_IFREG | 0444, pSkRootDir);
pProcFile->read_proc = proc_read; pProcFile->read_proc = sk_proc_read;
pProcFile->write_proc = NULL; pProcFile->write_proc = NULL;
pProcFile->nlink = 1; pProcFile->nlink = 1;
pProcFile->size = sizeof(dev->name+1); pProcFile->size = sizeof(dev->name+1);
pProcFile->data = (void*)pProcFile; pProcFile->data = (void*)pProcFile;
pProcFile->owner = THIS_MODULE;
memcpy((caddr_t) &dev->dev_addr, memcpy((caddr_t) &dev->dev_addr,
(caddr_t) &pAC->Addr.Net[1].CurrentMacAddress, 6); (caddr_t) &pAC->Addr.Net[1].CurrentMacAddress, 6);
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
//#define SPECIAL 32 /* 0x */ //#define SPECIAL 32 /* 0x */
#define LARGE 64 #define LARGE 64
extern void proc_fill_inode(struct inode *inode, int fill);
extern char * SkNumber(char * str, long long num, int base, int size, extern char * SkNumber(char * str, long long num, int base, int size,
int precision ,int type); int precision ,int type);
int proc_read(char *buffer, int proc_read(char *buffer,
...@@ -64,19 +63,8 @@ int proc_read(char *buffer, ...@@ -64,19 +63,8 @@ int proc_read(char *buffer,
int *eof, int *eof,
void *data); void *data);
static const char SK_Root_Dir_entry[] = "sk98lin";
extern struct net_device *sk98lin_root_dev;
struct proc_dir_entry pSkRootDir = {
0,
sizeof(SK_Root_Dir_entry)-1,
(const char*)SK_Root_Dir_entry,
S_IFDIR | S_IRUGO,
2, 0, 0, 0, NULL,
NULL
};
extern struct net_device *sk98lin_root_dev;
/***************************************************************************** /*****************************************************************************
* *
...@@ -90,7 +78,7 @@ struct proc_dir_entry pSkRootDir = { ...@@ -90,7 +78,7 @@ struct proc_dir_entry pSkRootDir = {
* Returns: buffer with statistic data * Returns: buffer with statistic data
* *
*/ */
int proc_read(char *buffer, int sk_proc_read(char *buffer,
char **buffer_location, char **buffer_location,
off_t offset, off_t offset,
int buffer_length, int buffer_length,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment