From patchwork Wed Aug 12 18:23:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eilon Greenstein X-Patchwork-Id: 31250 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 9952CB6F1E for ; Thu, 13 Aug 2009 04:24:53 +1000 (EST) Received: by ozlabs.org (Postfix) id 8B494DDD0C; Thu, 13 Aug 2009 04:24:53 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 0F4CFDDD0B for ; Thu, 13 Aug 2009 04:24:53 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753483AbZHLSYh (ORCPT ); Wed, 12 Aug 2009 14:24:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753461AbZHLSYh (ORCPT ); Wed, 12 Aug 2009 14:24:37 -0400 Received: from mms3.broadcom.com ([216.31.210.19]:3470 "EHLO MMS3.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753361AbZHLSYf (ORCPT ); Wed, 12 Aug 2009 14:24:35 -0400 Received: from [10.9.200.133] by MMS3.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Wed, 12 Aug 2009 11:24:24 -0700 X-Server-Uuid: B55A25B1-5D7D-41F8-BC53-C57E7AD3C201 Received: from mail-irva-13.broadcom.com (10.11.16.103) by IRVEXCHHUB02.corp.ad.broadcom.com (10.9.200.133) with Microsoft SMTP Server id 8.1.375.2; Wed, 12 Aug 2009 11:25:49 -0700 Received: from [10.185.6.73] (lb-tlvb-eilong.il.broadcom.com [10.185.6.73]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 638FA74D03; Wed, 12 Aug 2009 11:24:23 -0700 (PDT) Subject: [net-next 21/36] bnx2x: Move printing of version from probe to the init From: "Eilon Greenstein" Reply-to: eilong@broadcom.com To: "David Miller" cc: netdev@vger.kernel.org, "Benjamin Li" Organization: Broadcom Date: Wed, 12 Aug 2009 21:23:37 +0300 Message-ID: <1250101417.27379.173.camel@lb-tlvb-eilong> MIME-Version: 1.0 X-Mailer: Evolution 2.22.3.1 X-WSS-ID: 669DD75260076687588-01-01 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Move printing of version from probe to the init function Rather then checking if this is the first module probe call to print the version of the driver only once, the statement is moved to the init function of the module where init is only called once Signed-off-by: Benjamin Li Signed-off-by: Eilon Greenstein --- drivers/net/bnx2x_main.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 5042109..347036f 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -11871,15 +11871,11 @@ request_firmware_exit: static int __devinit bnx2x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { - static int version_printed; struct net_device *dev = NULL; struct bnx2x *bp; int pcie_width, pcie_speed; int rc; - if (version_printed++ == 0) - printk(KERN_INFO "%s", version); - /* dev zeroed in init_etherdev */ dev = alloc_etherdev_mq(sizeof(*bp), MAX_CONTEXT); if (!dev) { @@ -12217,6 +12213,8 @@ static int __init bnx2x_init(void) { int ret; + printk(KERN_INFO "%s", version); + bnx2x_wq = create_singlethread_workqueue("bnx2x"); if (bnx2x_wq == NULL) { printk(KERN_ERR PFX "Cannot create workqueue\n");