Commit 47fff65a authored by Richard Gooch's avatar Richard Gooch

Removed deprecated devfs_find_handle()

parent d45db7c2
...@@ -1950,3 +1950,10 @@ Changes for patch v215 ...@@ -1950,3 +1950,10 @@ Changes for patch v215
<devfs_find_and_unregister> <devfs_find_and_unregister>
- Switched many functions from <devfs_find_handle> to <devfs_get_handle> - Switched many functions from <devfs_find_handle> to <devfs_get_handle>
===============================================================================
Changes for patch v216
- Switched arch/ia64/sn/io/hcl.c from <devfs_find_handle> to
<devfs_get_handle>
- Removed deprecated <devfs_find_handle>
...@@ -673,8 +673,9 @@ hwgraph_edge_get(devfs_handle_t from, char *name, devfs_handle_t *toptr) ...@@ -673,8 +673,9 @@ hwgraph_edge_get(devfs_handle_t from, char *name, devfs_handle_t *toptr)
* Call devfs to get the devfs entry. * Call devfs to get the devfs entry.
*/ */
namelen = (int) strlen(name); namelen = (int) strlen(name);
target_handle = devfs_find_handle (from, name, 0, 0, target_handle = devfs_get_handle(from, name, 0, 0,
0, 1); /* Yes traverse symbolic links */ 0, 1); /* Yes traverse symbolic links */
devfs_put(target_handle); /* Assume we're the owner */
if (target_handle == NULL) if (target_handle == NULL)
return(-1); return(-1);
else else
...@@ -952,12 +953,13 @@ hwgraph_path_lookup( devfs_handle_t start_vertex_handle, ...@@ -952,12 +953,13 @@ hwgraph_path_lookup( devfs_handle_t start_vertex_handle,
devfs_handle_t *vertex_handle_ptr, devfs_handle_t *vertex_handle_ptr,
char **remainder) char **remainder)
{ {
*vertex_handle_ptr = devfs_find_handle(start_vertex_handle, /* start dir */ *vertex_handle_ptr = devfs_get_handle(start_vertex_handle, /* start dir */
lookup_path, /* path */ lookup_path, /* path */
0, /* major */ 0, /* major */
0, /* minor */ 0, /* minor */
0, /* char | block */ 0, /* char | block */
1); /* traverse symlinks */ 1); /* traverse symlinks */
devfs_put(*vertex_handle_ptr); /* Assume we're the owner */
if (*vertex_handle_ptr == NULL) if (*vertex_handle_ptr == NULL)
return(-1); return(-1);
else else
...@@ -965,22 +967,23 @@ hwgraph_path_lookup( devfs_handle_t start_vertex_handle, ...@@ -965,22 +967,23 @@ hwgraph_path_lookup( devfs_handle_t start_vertex_handle,
} }
/* /*
* hwgraph_traverse - Find and return the devfs handle starting from de. * hwgraph_traverse - Find and return the devfs handle starting from dir.
* *
*/ */
graph_error_t graph_error_t
hwgraph_traverse(devfs_handle_t de, char *path, devfs_handle_t *found) hwgraph_traverse(devfs_handle_t dir, char *path, devfs_handle_t *found)
{ {
/* /*
* get the directory entry (path should end in a directory) * get the directory entry (path should end in a directory)
*/ */
*found = devfs_find_handle(de, /* start dir */ *found = devfs_get_handle(dir, /* start dir */
path, /* path */ path, /* path */
0, /* major */ 0, /* major */
0, /* minor */ 0, /* minor */
0, /* char | block */ 0, /* char | block */
1); /* traverse symlinks */ 1); /* traverse symlinks */
devfs_put(*found); /* Assume we're the owner */
if (*found == NULL) if (*found == NULL)
return(GRAPH_NOT_FOUND); return(GRAPH_NOT_FOUND);
else else
...@@ -994,12 +997,16 @@ hwgraph_traverse(devfs_handle_t de, char *path, devfs_handle_t *found) ...@@ -994,12 +997,16 @@ hwgraph_traverse(devfs_handle_t de, char *path, devfs_handle_t *found)
devfs_handle_t devfs_handle_t
hwgraph_path_to_vertex(char *path) hwgraph_path_to_vertex(char *path)
{ {
return(devfs_find_handle(NULL, /* start dir */ devfs_handle_t de;
de = devfs_get_handle(NULL, /* start dir */
path, /* path */ path, /* path */
0, /* major */ 0, /* major */
0, /* minor */ 0, /* minor */
0, /* char | block */ 0, /* char | block */
1)); /* traverse symlinks */ 1);
devfs_put(de); /* Assume we're the owner */
return(de);
} }
/* /*
...@@ -1017,32 +1024,40 @@ hwgraph_path_to_dev(char *path) ...@@ -1017,32 +1024,40 @@ hwgraph_path_to_dev(char *path)
/* /*
* hwgraph_block_device_get - return the handle of the block device file. * hwgraph_block_device_get - return the handle of the block device file.
* The assumption here is that de is a directory. * The assumption here is that dir is a directory.
*/ */
devfs_handle_t devfs_handle_t
hwgraph_block_device_get(devfs_handle_t de) hwgraph_block_device_get(devfs_handle_t dir)
{ {
return(devfs_find_handle(de, /* start dir */ devfs_handle_t de;
de = devfs_get_handle(dir, /* start dir */
"block", /* path */ "block", /* path */
0, /* major */ 0, /* major */
0, /* minor */ 0, /* minor */
DEVFS_SPECIAL_BLK, /* char | block */ DEVFS_SPECIAL_BLK, /* char | block */
1)); /* traverse symlinks */ 1); /* traverse symlinks */
devfs_put(de); /* Assume we're the owner */
return(de);
} }
/* /*
* hwgraph_char_device_get - return the handle of the char device file. * hwgraph_char_device_get - return the handle of the char device file.
* The assumption here is that de is a directory. * The assumption here is that dir is a directory.
*/ */
devfs_handle_t devfs_handle_t
hwgraph_char_device_get(devfs_handle_t de) hwgraph_char_device_get(devfs_handle_t dir)
{ {
return(devfs_find_handle(de, /* start dir */ devfs_handle_t de;
de = devfs_get_handle(dir, /* start dir */
"char", /* path */ "char", /* path */
0, /* major */ 0, /* major */
0, /* minor */ 0, /* minor */
DEVFS_SPECIAL_CHR, /* char | block */ DEVFS_SPECIAL_CHR, /* char | block */
1)); /* traverse symlinks */ 1); /* traverse symlinks */
devfs_put(de); /* Assume we're the owner */
return(de);
} }
/* /*
......
...@@ -642,6 +642,9 @@ ...@@ -642,6 +642,9 @@
20020725 Richard Gooch <rgooch@atnf.csiro.au> 20020725 Richard Gooch <rgooch@atnf.csiro.au>
Created <devfs_find_and_unregister>. Created <devfs_find_and_unregister>.
v1.19 v1.19
20020728 Richard Gooch <rgooch@atnf.csiro.au>
Removed deprecated <devfs_find_handle>.
v1.20
*/ */
#include <linux/types.h> #include <linux/types.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -674,7 +677,7 @@ ...@@ -674,7 +677,7 @@
#include <asm/bitops.h> #include <asm/bitops.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#define DEVFS_VERSION "1.19 (20020725)" #define DEVFS_VERSION "1.20 (20020728)"
#define DEVFS_NAME "devfs" #define DEVFS_NAME "devfs"
...@@ -1889,26 +1892,12 @@ void devfs_find_and_unregister (devfs_handle_t dir, const char *name, ...@@ -1889,26 +1892,12 @@ void devfs_find_and_unregister (devfs_handle_t dir, const char *name,
char type, int traverse_symlinks) char type, int traverse_symlinks)
{ {
devfs_handle_t de = devfs_get_handle (dir, name, major, minor, devfs_handle_t de = devfs_get_handle (dir, name, major, minor,
type,traverse_symlinks); type, traverse_symlinks);
devfs_unregister (de); devfs_unregister (de);
devfs_put (de); devfs_put (de);
} }
/* Compatibility function. Will be removed in sometime in 2.5 */
devfs_handle_t devfs_find_handle (devfs_handle_t dir, const char *name,
unsigned int major, unsigned int minor,
char type, int traverse_symlinks)
{
devfs_handle_t de;
de = devfs_get_handle (dir, name, major, minor, type, traverse_symlinks);
devfs_put (de);
return de;
} /* End Function devfs_find_handle */
/** /**
* devfs_get_flags - Get the flags for a devfs entry. * devfs_get_flags - Get the flags for a devfs entry.
* @de: The handle to the device entry. * @de: The handle to the device entry.
...@@ -2381,7 +2370,6 @@ EXPORT_SYMBOL(devfs_unregister); ...@@ -2381,7 +2370,6 @@ EXPORT_SYMBOL(devfs_unregister);
EXPORT_SYMBOL(devfs_mk_symlink); EXPORT_SYMBOL(devfs_mk_symlink);
EXPORT_SYMBOL(devfs_mk_dir); EXPORT_SYMBOL(devfs_mk_dir);
EXPORT_SYMBOL(devfs_get_handle); EXPORT_SYMBOL(devfs_get_handle);
EXPORT_SYMBOL(devfs_find_handle);
EXPORT_SYMBOL(devfs_get_flags); EXPORT_SYMBOL(devfs_get_flags);
EXPORT_SYMBOL(devfs_set_flags); EXPORT_SYMBOL(devfs_set_flags);
EXPORT_SYMBOL(devfs_get_maj_min); EXPORT_SYMBOL(devfs_get_maj_min);
......
...@@ -77,9 +77,6 @@ extern devfs_handle_t devfs_get_handle (devfs_handle_t dir, const char *name, ...@@ -77,9 +77,6 @@ extern devfs_handle_t devfs_get_handle (devfs_handle_t dir, const char *name,
extern void devfs_find_and_unregister (devfs_handle_t dir, const char *name, extern void devfs_find_and_unregister (devfs_handle_t dir, const char *name,
unsigned int major, unsigned int minor, unsigned int major, unsigned int minor,
char type, int traverse_symlinks); char type, int traverse_symlinks);
extern devfs_handle_t devfs_find_handle (devfs_handle_t dir, const char *name,
unsigned int major,unsigned int minor,
char type, int traverse_symlinks);
extern int devfs_get_flags (devfs_handle_t de, unsigned int *flags); extern int devfs_get_flags (devfs_handle_t de, unsigned int *flags);
extern int devfs_set_flags (devfs_handle_t de, unsigned int flags); extern int devfs_set_flags (devfs_handle_t de, unsigned int flags);
extern int devfs_get_maj_min (devfs_handle_t de, extern int devfs_get_maj_min (devfs_handle_t de,
...@@ -174,15 +171,6 @@ static inline void devfs_find_and_unregister (devfs_handle_t dir, ...@@ -174,15 +171,6 @@ static inline void devfs_find_and_unregister (devfs_handle_t dir,
char type, int traverse_symlinks) char type, int traverse_symlinks)
{ {
} }
static inline devfs_handle_t devfs_find_handle (devfs_handle_t dir,
const char *name,
unsigned int major,
unsigned int minor,
char type,
int traverse_symlinks)
{
return NULL;
}
static inline int devfs_get_flags (devfs_handle_t de, unsigned int *flags) static inline int devfs_get_flags (devfs_handle_t de, unsigned int *flags)
{ {
return 0; return 0;
......
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