From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933156AbbBBS0t (ORCPT ); Mon, 2 Feb 2015 13:26:49 -0500 Received: from mail-la0-f54.google.com ([209.85.215.54]:35989 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933056AbbBBS0m (ORCPT ); Mon, 2 Feb 2015 13:26:42 -0500 From: Ricardo Ribalda Delgado To: Masaru Nomura , Peter P Waskiewicz Jr , Tapasweni Pathak , Iulia Manda , Catalina Mocanu , sparmaintainer@unisys.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH 2/2] staging/unisys/visorutil/procobjecttree: Replace typedef Date: Mon, 2 Feb 2015 19:26:33 +0100 Message-Id: <1422901593-5707-3-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1422901593-5707-1-git-send-email-ricardo.ribalda@gmail.com> References: <1422901593-5707-1-git-send-email-ricardo.ribalda@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of declaring a new type, define a new struct. Signed-off-by: Ricardo Ribalda Delgado --- drivers/staging/unisys/visorutil/procobjecttree.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/visorutil/procobjecttree.c b/drivers/staging/unisys/visorutil/procobjecttree.c index 637c5ef..fb5df92 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 * ///... @@ -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,7 +254,8 @@ 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"); @@ -340,7 +341,9 @@ 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; + + ctx = (struct proc_dir_entry_context *)(seq->private); if (ctx == NULL) { ERRDRV("I don't have a freakin' clue..."); -- 2.1.4