aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorutil/procobjecttree.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/unisys/visorutil/procobjecttree.c')
-rw-r--r--drivers/staging/unisys/visorutil/procobjecttree.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/staging/unisys/visorutil/procobjecttree.c b/drivers/staging/unisys/visorutil/procobjecttree.c
index 195772d22c9e..82279ca5fbe1 100644
--- a/drivers/staging/unisys/visorutil/procobjecttree.c
+++ b/drivers/staging/unisys/visorutil/procobjecttree.c
@@ -25,12 +25,12 @@
* need in order to call the callback function that supplies the /proc read
* info for that file.
*/
-typedef struct {
+struct proc_dir_entry_context {
void (*show_property)(struct seq_file *, void *, int);
MYPROCOBJECT *procObject;
int propertyIndex;
-} PROCDIRENTRYCONTEXT;
+};
/** This describes the attributes of a tree rooted at
* <procDirRoot>/<name[0]>/<name[1]>/...
@@ -86,7 +86,7 @@ struct MYPROCOBJECT_Tag {
/** this is a holding area for the context information that is needed
* to run the /proc callback function */
- PROCDIRENTRYCONTEXT *procDirPropertyContexts;
+ struct proc_dir_entry_context *procDirPropertyContexts;
};
@@ -254,15 +254,16 @@ MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type,
goto Away;
}
obj->procDirPropertyContexts =
- kzalloc((type->nProperties + 1) * sizeof(PROCDIRENTRYCONTEXT),
+ kzalloc((type->nProperties + 1) *
+ sizeof(struct proc_dir_entry_context),
GFP_KERNEL | __GFP_NORETRY);
if (obj->procDirPropertyContexts == NULL) {
ERRDRV("out of memory\n");
goto Away;
}
- obj->procDirProperties =
- kzalloc((type->nProperties + 1) * sizeof(struct proc_dir_entry *),
- GFP_KERNEL | __GFP_NORETRY);
+ obj->procDirProperties = kzalloc((type->nProperties + 1) *
+ sizeof(struct proc_dir_entry *),
+ GFP_KERNEL | __GFP_NORETRY);
if (obj->procDirProperties == NULL) {
ERRDRV("out of memory\n");
goto Away;
@@ -276,8 +277,8 @@ MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type,
/* only create properties that have names */
obj->procDirProperties[i] =
createProcFile(type->propertyNames[i],
- obj->procDir, &proc_fops,
- &obj->procDirPropertyContexts[i]);
+ obj->procDir, &proc_fops,
+ &obj->procDirPropertyContexts[i]);
if (obj->procDirProperties[i] == NULL) {
rc = NULL;
goto Away;
@@ -340,7 +341,7 @@ EXPORT_SYMBOL_GPL(visor_proc_DestroyObject);
static int seq_show(struct seq_file *seq, void *offset)
{
- PROCDIRENTRYCONTEXT *ctx = (PROCDIRENTRYCONTEXT *)(seq->private);
+ struct proc_dir_entry_context *ctx = seq->private;
if (ctx == NULL) {
ERRDRV("I don't have a freakin' clue...");