From patchwork Sat Sep 12 18:10:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 7167141 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 856CDBEEC1 for ; Sat, 12 Sep 2015 18:11:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AFE34206F7 for ; Sat, 12 Sep 2015 18:11:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C5E7D2072E for ; Sat, 12 Sep 2015 18:11:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754581AbbILSL3 (ORCPT ); Sat, 12 Sep 2015 14:11:29 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:38675 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753303AbbILSLL (ORCPT ); Sat, 12 Sep 2015 14:11:11 -0400 Received: by wiclk2 with SMTP id lk2so89648402wic.1 for ; Sat, 12 Sep 2015 11:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uz6y0w7FHYS0NJ37m0i95B/O40tifQFSjJovMc1pgRE=; b=ki4/Jf0SHucZc57VISHCaLYQvHUSgMwVB/ITGq+fDEcXbaLFCvpaecf2y64SAvw3p3 ZzYXx1yd92EQFNh9WuKaRhZV9+95hZKAMGz466as17Y74/Y0o0/fQn3f/bqheJYXu0CG MA0g0hqz7hPSQlipRuPrS6q0Ugwf13IBfST5DoKpfeK20WViWIDXKGdH4/lHxfiHTy43 0EcfE7IEfxmAN9VyfaqDEfQVjTgsnhx0Fa+EcWtoXOZ1IBviL6+ji2uPCMqeLoO5b8YI o3pegyueqKvNQ8C+943BIWh9zYhKYEkM1PIrB4OmZkWYQtfZ1xwYfu3O+TQBPjd+9x5o vHfA== X-Received: by 10.194.173.72 with SMTP id bi8mr9994837wjc.100.1442081470021; Sat, 12 Sep 2015 11:11:10 -0700 (PDT) Received: from tipsey.3.home (188.31.129.159.threembb.co.uk. [188.31.129.159]) by smtp.gmail.com with ESMTPSA id c3sm6628188wja.3.2015.09.12.11.11.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 12 Sep 2015 11:11:09 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 06/11] staging: vt6655: remove and move vt6655_init_info Date: Sat, 12 Sep 2015 19:10:33 +0100 Message-Id: <1442081438-3485-6-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1442081438-3485-1-git-send-email-tvboxspy@gmail.com> References: <1442081438-3485-1-git-send-email-tvboxspy@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP move code to vt6655_probe. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/device_main.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 03cc52e..ce2df37 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -28,7 +28,6 @@ * * vt6655_probe - module initial (insmod) driver entry * vt6655_remove - module remove entry - * vt6655_init_info - device structure resource allocation function * device_free_info - device structure resource free function * device_get_pci_info - get allocated pci io/mem resource * device_print_info - print out resource @@ -136,8 +135,6 @@ static const struct pci_device_id vt6655_pci_id_table[] = { /*--------------------- Static Functions --------------------------*/ static int vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent); -static void vt6655_init_info(struct pci_dev *pcid, - struct vnt_private **ppDevice); static void device_free_info(struct vnt_private *pDevice); static bool device_get_pci_info(struct vnt_private *, struct pci_dev *pcid); static void device_print_info(struct vnt_private *pDevice); @@ -436,14 +433,6 @@ static void device_print_info(struct vnt_private *pDevice) (unsigned long)pDevice->PortOffset, pDevice->pcid->irq); } -static void vt6655_init_info(struct pci_dev *pcid, - struct vnt_private **ppDevice) -{ - (*ppDevice)->pcid = pcid; - - spin_lock_init(&((*ppDevice)->lock)); -} - static bool device_get_pci_info(struct vnt_private *pDevice, struct pci_dev *pcid) { @@ -1643,8 +1632,9 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) } priv = hw->priv; + priv->pcid = pcid; - vt6655_init_info(pcid, &priv); + spin_lock_init(&priv->lock); priv->hw = hw;