1
0
Fork 0

staging: dgnc: removes proc code

This patch removes the dgnc_proc.c and dgnc_proc.h files and all
references to proc functions in dgnc_driver.c. This also removes proc.h
from the include headers in driver.c, mgmt.c and sysfs.c and proc.o
from the Makefile.

Drivers now use sysfs instead of proc.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Lidza Louina 2013-08-15 10:28:22 -04:00 committed by Greg Kroah-Hartman
parent 41506a9f83
commit 35cf904593
6 changed files with 1 additions and 1710 deletions

View File

@ -4,4 +4,4 @@ obj-$(CONFIG_DGNC) += dgnc.o
dgnc-objs := dgnc_cls.o dgnc_driver.o\
dgnc_mgmt.o dgnc_neo.o\
dgnc_proc.o dgnc_trace.o dgnc_tty.o dgnc_sysfs.o
dgnc_trace.o dgnc_tty.o dgnc_sysfs.o

View File

@ -43,7 +43,6 @@
#include "dgnc_driver.h"
#include "dgnc_pci.h"
#include "dgnc_proc.h"
#include "dpacompat.h"
#include "dgnc_mgmt.h"
#include "dgnc_tty.h"
@ -312,11 +311,6 @@ static int dgnc_start(void)
dgnc_Major_Control_Registered = TRUE;
}
/*
* Register our basic stuff in /proc/dgnc
*/
dgnc_proc_register_basic_prescan();
/*
* Init any global tty stuff.
*/
@ -401,8 +395,6 @@ void dgnc_cleanup_module(void)
/* Turn off poller right away. */
del_timer_sync(&dgnc_poll_timer);
dgnc_proc_unregister_all();
dgnc_remove_driver_sysfiles(&dgnc_driver);
if (dgnc_Major_Control_Registered) {
@ -742,8 +734,6 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
*/
brd->flipbuf = dgnc_driver_kzmalloc(MYFLIPLEN, GFP_KERNEL);
dgnc_proc_register_basic_postscan(dgnc_NumBoards);
wake_up_interruptible(&brd->state_wait);
return(0);

View File

@ -47,7 +47,6 @@
#include "dgnc_driver.h"
#include "dgnc_pci.h"
#include "dgnc_proc.h"
#include "dgnc_kcompat.h" /* Kernel 2.4/2.6 compat includes */
#include "dgnc_mgmt.h"
#include "dpacompat.h"

File diff suppressed because it is too large Load Diff

View File

@ -1,147 +0,0 @@
/*
* Copyright 2003 Digi International (www.digi.com)
* Scott H Kilau <Scott_Kilau at digi dot com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* NOTE: THIS IS A SHARED HEADER. DO NOT CHANGE CODING STYLE!!!
*
*
* $Id: dgnc_proc.h,v 1.1.1.1 2009/05/20 12:19:19 markh Exp $
*
* Description:
*
* Describes the private structures used to manipulate the "special"
* proc constructs (not read-only) used by the Digi Neo software.
* The concept is borrowed heavily from the "sysctl" interface of
* the kernel. I decided not to use the structures and functions
* provided by the kernel for two reasons:
*
* 1. Due to the planned use of "/proc" in the Neo driver, many
* of the functions of the "sysctl" interface would go unused.
* A simpler interface will be easier to maintain.
*
* 2. I'd rather divorce our "added package" from the kernel internals.
* If the "sysctl" structures should change, I will be insulated
* from those changes. These "/proc" entries won't be under the
* "sys" tree anyway, so there is no need to maintain a strict
* dependence relationship.
*
* Author:
*
* Scott H Kilau
*
*/
#ifndef _DGNC_RW_PROC_H
#define _DGNC_RW_PROC_H
/*
* The list of DGNC entries with r/w capabilities.
* These magic numbers are used for identification purposes.
*/
enum {
DGNC_INFO = 1, /* Get info about the running module */
DGNC_MKNOD = 2, /* Get info about driver devices */
DGNC_BOARD_INFO = 3, /* Get info about the specific board */
DGNC_BOARD_VPD = 4, /* Get info about the board's VPD */
DGNC_BOARD_TTYSTATS = 5, /* Get info about the board's tty stats */
DGNC_BOARD_TTYINTR = 6, /* Get info about the board's tty intrs */
DGNC_BOARD_TTYFLAGS = 7, /* Get info about the board's tty flags */
DGNC_BOARD_MKNOD = 8, /* Get info about board devices */
DGNC_PORT_INFO = 9, /* Get info about the specific port */
DGNC_PORT_SNIFF = 10, /* Sniff data in/out of specific port */
DGNC_PORT_CUSTOM_TTYNAME = 11, /* Get info about UDEV tty name */
DGNC_PORT_CUSTOM_PRNAME = 12, /* Get info about UDEV pr name */
};
/*
* Directions for proc handlers
*/
enum {
INBOUND = 1, /* Data being written to kernel */
OUTBOUND = 2, /* Data being read from the kernel */
};
/*
* Each entry in a DGNC proc directory is described with a
* "dgnc_proc_entry" structure. A collection of these
* entries (in an array) represents the members associated
* with a particular "/proc" directory, and is referred to
* as a table. All "tables" are terminated by an entry with
* zeros for every member.
*
* The structure members are as follows:
*
* int magic -- ID number associated with this particular
* entry. Should be unique across all of
* DGNC.
*
* const char *name -- ASCII name associated with the /proc entry.
*
* mode_t mode -- File access permisssions for the /proc entry.
*
* dgnc_proc_entry *child -- When set, this entry refers to a directory,
* and points to the table which describes the
* entries in the subdirectory
*
* dgnc_proc_handler *open_handler -- When set, points to the fxn which
* does any "extra" open stuff.
*
* dgnc_proc_handler *close_handler -- When set, points to the fxn which
* does any "extra" close stuff.
*
* dgnc_proc_handler *read_handler -- When set, points to the fxn which
* handle outbound data flow
*
* dgnc_proc_handler *write_handler -- When set, points to the fxn which
* handles inbound data flow
*
* struct proc_dir_entry *de -- Pointer to the directory entry for this
* object once registered. Used to grab
* the handle of the object for
* unregistration
*
* void *data; When set, points to the parent structure
*
*/
struct dgnc_proc_entry {
int magic; /* Integer identifier */
const char *name; /* ASCII identifier */
mode_t mode; /* File access permissions */
struct dgnc_proc_entry *child; /* Child pointer */
int (*open_handler) (struct dgnc_proc_entry *table, int dir, struct file *filp,
void *buffer, ssize_t *lenp, loff_t *ppos);
int (*close_handler) (struct dgnc_proc_entry *table, int dir, struct file *filp,
void *buffer, ssize_t *lenp, loff_t *ppos);
int (*read_handler) (struct dgnc_proc_entry *table, int dir, struct file *filp,
char __user *buffer, ssize_t *lenp, loff_t *ppos);
int (*write_handler) (struct dgnc_proc_entry *table, int dir, struct file *filp,
const char __user *buffer, ssize_t *lenp, loff_t *ppos);
struct proc_dir_entry *de; /* proc entry pointer */
struct semaphore excl_sem; /* Protects exclusive access var */
int excl_cnt; /* Counts number of curr accesses */
void *data; /* Allows storing a pointer to parent */
};
void dgnc_proc_register_basic_prescan(void);
void dgnc_proc_register_basic_postscan(int board_num);
void dgnc_proc_unregister_all(void);
#endif /* _DGNC_RW_PROC_H */

View File

@ -43,7 +43,6 @@
#include <linux/kdev_t.h>
#include "dgnc_driver.h"
#include "dgnc_proc.h"
#include "dgnc_mgmt.h"