aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>2015-02-02 13:55:46 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-07 04:18:38 -0500
commit4abfc1f5fb846bbc8b151aa35eae2c2fea686e89 (patch)
tree2a1d28bf61f05a2e48e42b50337546d7e7cc44a0 /drivers/staging
parent048035bf8c7b752e9fe608ff3069e41c460efda5 (diff)
staging/unisys/visorutil/procobjecttree: Replace typedef
Instead of declaring a new type, define a new struct. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/unisys/visorutil/procobjecttree.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/unisys/visorutil/procobjecttree.c b/drivers/staging/unisys/visorutil/procobjecttree.c
index 637c5ef1a767..82279ca5fbe1 100644
--- a/drivers/staging/unisys/visorutil/procobjecttree.c
+++ b/drivers/staging/unisys/visorutil/procobjecttree.c
@@ -25,12 +25,12 @@
25 * need in order to call the callback function that supplies the /proc read 25 * need in order to call the callback function that supplies the /proc read
26 * info for that file. 26 * info for that file.
27 */ 27 */
28typedef struct { 28struct proc_dir_entry_context {
29 void (*show_property)(struct seq_file *, void *, int); 29 void (*show_property)(struct seq_file *, void *, int);
30 MYPROCOBJECT *procObject; 30 MYPROCOBJECT *procObject;
31 int propertyIndex; 31 int propertyIndex;
32 32
33} PROCDIRENTRYCONTEXT; 33};
34 34
35/** This describes the attributes of a tree rooted at 35/** This describes the attributes of a tree rooted at
36 * <procDirRoot>/<name[0]>/<name[1]>/... 36 * <procDirRoot>/<name[0]>/<name[1]>/...
@@ -86,7 +86,7 @@ struct MYPROCOBJECT_Tag {
86 86
87 /** this is a holding area for the context information that is needed 87 /** this is a holding area for the context information that is needed
88 * to run the /proc callback function */ 88 * to run the /proc callback function */
89 PROCDIRENTRYCONTEXT *procDirPropertyContexts; 89 struct proc_dir_entry_context *procDirPropertyContexts;
90}; 90};
91 91
92 92
@@ -254,7 +254,8 @@ MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type,
254 goto Away; 254 goto Away;
255 } 255 }
256 obj->procDirPropertyContexts = 256 obj->procDirPropertyContexts =
257 kzalloc((type->nProperties + 1) * sizeof(PROCDIRENTRYCONTEXT), 257 kzalloc((type->nProperties + 1) *
258 sizeof(struct proc_dir_entry_context),
258 GFP_KERNEL | __GFP_NORETRY); 259 GFP_KERNEL | __GFP_NORETRY);
259 if (obj->procDirPropertyContexts == NULL) { 260 if (obj->procDirPropertyContexts == NULL) {
260 ERRDRV("out of memory\n"); 261 ERRDRV("out of memory\n");
@@ -340,7 +341,7 @@ EXPORT_SYMBOL_GPL(visor_proc_DestroyObject);
340 341
341static int seq_show(struct seq_file *seq, void *offset) 342static int seq_show(struct seq_file *seq, void *offset)
342{ 343{
343 PROCDIRENTRYCONTEXT *ctx = (PROCDIRENTRYCONTEXT *)(seq->private); 344 struct proc_dir_entry_context *ctx = seq->private;
344 345
345 if (ctx == NULL) { 346 if (ctx == NULL) {
346 ERRDRV("I don't have a freakin' clue..."); 347 ERRDRV("I don't have a freakin' clue...");