Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141739
b: refs/heads/master
c: 7c14e54
h: refs/heads/master
i:
  141737: 9ce3837
  141735: 5b0fe48
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Apr 3, 2009
1 parent 5642d46 commit 6c6a945
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 70 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70e2db22bd520018b39ea7d50ebbcec5042efd9f
refs/heads/master: 7c14e54458b7f419fbaa802657c2535b2fdf217e
69 changes: 0 additions & 69 deletions trunk/drivers/staging/epl/EplApiLinuxKernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@
#include <asm/uaccess.h>
#include <linux/vmalloc.h>

#ifdef CONFIG_DEVFS_FS
#include <linux/major.h>
#include <linux/devfs_fs_kernel.h>
#endif

#include "Epl.h"
#include "EplApiLinux.h"
//#include "kernel/EplPdokCal.h"
Expand Down Expand Up @@ -147,19 +142,10 @@ void TgtDbgSignalTracePoint(u8 bTracePointNumber_p);
// Global variables
//---------------------------------------------------------------------------

#ifdef CONFIG_DEVFS_FS

// driver major number
static int nDrvMajorNumber_g;

#else

// device number (major and minor)
static dev_t nDevNum_g;
static struct cdev *pEpl_cdev_g;

#endif

static volatile unsigned int uiEplState_g = EPL_STATE_NOTOPEN;

static struct semaphore SemaphoreCbEvent_g; // semaphore for EplLinCbEvent
Expand Down Expand Up @@ -245,9 +231,6 @@ static int __init EplLinInit(void)
tEplKernel EplRet;
int iErr;
int iRet;
#ifdef CONFIG_DEVFS_FS
int nMinorNumber;
#endif

TRACE0("EPL: + EplLinInit...\n");
TRACE2("EPL: Driver build: %s / %s\n", __DATE__, __TIME__);
Expand All @@ -261,44 +244,6 @@ static int __init EplLinInit(void)
init_waitqueue_head(&WaitQueueProcess_g);
init_waitqueue_head(&WaitQueueRelease_g);

#ifdef CONFIG_DEVFS_FS

// register character device handler
TRACE2("EPL: Installing Driver '%s', Version %s...\n",
EPLLIN_DRV_NAME, EPL_PRODUCT_VERSION);
TRACE0("EPL: (using dynamic major number assignment)\n");
nDrvMajorNumber_g =
register_chrdev(0, EPLLIN_DRV_NAME, &EplLinFileOps_g);
if (nDrvMajorNumber_g != 0) {
TRACE2
("EPL: Driver '%s' installed successful, assigned MajorNumber=%d\n",
EPLLIN_DRV_NAME, nDrvMajorNumber_g);
} else {
TRACE1
("EPL: ERROR: Driver '%s' is unable to get a free MajorNumber!\n",
EPLLIN_DRV_NAME);
iRet = -EIO;
goto Exit;
}

// create device node in DEVFS
nMinorNumber = 0;
TRACE1("EPL: Creating device node '/dev/%s'...\n", EPLLIN_DEV_NAME);
iErr =
devfs_mk_cdev(MKDEV(nDrvMajorNumber_g, nMinorNumber),
S_IFCHR | S_IRUGO | S_IWUGO, EPLLIN_DEV_NAME);
if (iErr == 0) {
TRACE1("EPL: Device node '/dev/%s' created successful.\n",
EPLLIN_DEV_NAME);
} else {
TRACE1("EPL: ERROR: unable to create device node '/dev/%s'\n",
EPLLIN_DEV_NAME);
iRet = -EIO;
goto Exit;
}

#else

// register character device handler
// only one Minor required
TRACE2("EPL: Installing Driver '%s', Version %s...\n",
Expand Down Expand Up @@ -327,7 +272,6 @@ static int __init EplLinInit(void)
iRet = -EIO;
goto Exit;
}
#endif

// create device node in PROCFS
EplRet = EplLinProcInit();
Expand Down Expand Up @@ -363,25 +307,12 @@ static void __exit EplLinExit(void)

TRACE0("EPL: + EplLinExit...\n");

#ifdef CONFIG_DEVFS_FS

// remove device node from DEVFS
devfs_remove(EPLLIN_DEV_NAME);
TRACE1("EPL: Device node '/dev/%s' removed.\n", EPLLIN_DEV_NAME);

// unregister character device handler
unregister_chrdev(nDrvMajorNumber_g, EPLLIN_DRV_NAME);

#else

// remove cdev structure
cdev_del(pEpl_cdev_g);

// unregister character device handler
unregister_chrdev_region(nDevNum_g, 1);

#endif

TRACE1("EPL: Driver '%s' removed.\n", EPLLIN_DRV_NAME);

TRACE0("EPL: - EplLinExit\n");
Expand Down

0 comments on commit 6c6a945

Please sign in to comment.