From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756660AbcEaUDS (ORCPT ); Tue, 31 May 2016 16:03:18 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:33528 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755329AbcEaUCR (ORCPT ); Tue, 31 May 2016 16:02:17 -0400 From: Gustavo Padovan To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, dri-devel@lists.freedesktop.org, Daniel Stone , =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Riley Andrews , Daniel Vetter , Rob Clark , Greg Hackmann , John Harrison , Maarten Lankhorst , Sumit Semwal , Gustavo Padovan Subject: [PATCH 15/18] staging/android: remove sync_timeline_destroy() Date: Tue, 31 May 2016 16:59:10 -0300 Message-Id: <1464724753-2490-16-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464724753-2490-1-git-send-email-gustavo@padovan.org> References: <1464724753-2490-1-git-send-email-gustavo@padovan.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gustavo Padovan This function was just used by the file release function, so we just fold its content there and remove sync_timeline_destroy(). Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c index 1f956b9..cf4de27 100644 --- a/drivers/staging/android/sw_sync.c +++ b/drivers/staging/android/sw_sync.c @@ -98,21 +98,6 @@ static void sync_timeline_put(struct sync_timeline *obj) } /** - * sync_timeline_destroy() - destroys a sync object - * @obj: sync_timeline to destroy - * - * A sync implementation should call this when the @obj is going away - * (i.e. module unload.) @obj won't actually be freed until all its children - * fences are freed. - */ -static void sync_timeline_destroy(struct sync_timeline *obj) -{ - smp_wmb(); - - sync_timeline_put(obj); -} - -/** * sync_timeline_signal() - signal a status change on a sync_timeline * @obj: sync_timeline to signal * @inc: num to increment on timeline->value @@ -275,7 +260,9 @@ static int sw_sync_debugfs_release(struct inode *inode, struct file *file) { struct sync_timeline *obj = file->private_data; - sync_timeline_destroy(obj); + smp_wmb(); + + sync_timeline_put(obj); return 0; } -- 2.5.5