From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752789AbbJCPXg (ORCPT ); Sat, 3 Oct 2015 11:23:36 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:34267 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752157AbbJCPXd (ORCPT ); Sat, 3 Oct 2015 11:23:33 -0400 From: Sudip Mukherjee To: Lidza Louina , Mark Hounschell , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, Sudip Mukherjee Subject: [PATCH 11/11] staging: dgnc: remove dgnc_init_globals function Date: Sat, 3 Oct 2015 20:52:49 +0530 Message-Id: <1443885769-21121-11-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443885769-21121-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1443885769-21121-1-git-send-email-sudipm.mukherjee@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The dgnc_init_globals() function is only initializing the timer so initialize it directly and remove dgnc_init_globals() and change the comment appropriately. Signed-off-by: Sudip Mukherjee --- drivers/staging/dgnc/dgnc_driver.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index 0886e33..9f5e4b6 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -38,7 +38,6 @@ MODULE_SUPPORTED_DEVICE("dgnc"); */ static int dgnc_start(void); static int dgnc_finalize_board_init(struct dgnc_board *brd); -static void dgnc_init_globals(void); static int dgnc_found_board(struct pci_dev *pdev, int id); static void dgnc_cleanup_board(struct dgnc_board *brd); static void dgnc_poll_handler(ulong dummy); @@ -213,8 +212,8 @@ static int dgnc_start(void) unsigned long flags; struct device *dev; - /* make sure that the globals are init'd before we do anything else */ - dgnc_init_globals(); + /* make sure timer is initialized before we do anything else */ + init_timer(&dgnc_poll_timer); /* * Register our base character device into the kernel. @@ -683,16 +682,3 @@ static void dgnc_poll_handler(ulong dummy) if (!dgnc_poll_stop) add_timer(&dgnc_poll_timer); } - -/* - * dgnc_init_globals() - * - * This is where we initialize the globals from the static insmod - * configuration variables. These are declared near the head of - * this file. - */ -static void dgnc_init_globals(void) -{ - init_timer(&dgnc_poll_timer); -} - -- 1.9.1