From patchwork Tue Jan 5 18:39:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 42152 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 8113EB6F06 for ; Wed, 6 Jan 2010 06:02:51 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751872Ab0AETCE (ORCPT ); Tue, 5 Jan 2010 14:02:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754577Ab0AETCC (ORCPT ); Tue, 5 Jan 2010 14:02:02 -0500 Received: from mail-ew0-f219.google.com ([209.85.219.219]:38936 "EHLO mail-ew0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754732Ab0AETAv (ORCPT ); Tue, 5 Jan 2010 14:00:51 -0500 Received: by ewy19 with SMTP id 19so8778277ewy.21 for ; Tue, 05 Jan 2010 11:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:message-id :content-type:content-transfer-encoding; bh=ieI83L4XolOROmsiGV/U5ayw6X6F84+EWjSxtR2hOEY=; b=x78Wj72aNzvEQ/Y+Ly2H6xitOEjMagS+pqLgoA5IsZcMsyS1IriHR/vOzgrx9PdwNv IjqPVo0kfQIUppAilNEi6M77jY0ixcd+xG55/Ijv8itXBQOPXdUuzDfOLCZQuNvgANvG vDqn6KfeE5VkllzMoPHI10qQ6jjWlGYa1ETuI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:message-id:content-type:content-transfer-encoding; b=X/+zrYdoFodQvOW2T/YxDGzVigEUOyJkXPQvfxLtEfUInS0FTl8jNjVWq2S1X9IEyF WemzHHss+2yqqHEE0zQDBjon3oR4obeLOsnMGTBC4T5kTkiRoAMijuVvwwvz1qA3fAXk tv+ZRJwklsH9AsLztojSIVXV8K/n9A0AMqnvA= Received: by 10.216.86.212 with SMTP id w62mr977245wee.131.1262718049470; Tue, 05 Jan 2010 11:00:49 -0800 (PST) Received: from szaki.localnet (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id x6sm52150683gvf.22.2010.01.05.11.00.47 (version=SSLv3 cipher=RC4-MD5); Tue, 05 Jan 2010 11:00:48 -0800 (PST) From: Bartlomiej Zolnierkiewicz To: Jiri Kosina Subject: Re: [PATCH 2/2] ide: add __init/__exit macros to drivers/ide/scc_pata.c Date: Tue, 5 Jan 2010 19:39:07 +0100 User-Agent: KMail/1.12.2 (Linux/2.6.31.8-0.1-desktop; KDE/4.3.1; x86_64; ; ) Cc: Peter Huewe , kernel-janitors@vger.kernel.org, "David S. Miller" , Sergei Shtylyov , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org References: <1261470564-23754-1-git-send-email-peterhuewe@gmx.de> <1261470564-23754-2-git-send-email-peterhuewe@gmx.de> In-Reply-To: MIME-Version: 1.0 Message-Id: <201001051939.07756.bzolnier@gmail.com> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org On Tuesday 05 January 2010 11:25:13 am Jiri Kosina wrote: > On Tue, 22 Dec 2009, peterhuewe@gmx.de wrote: > > > From: Peter Huewe > > > > Trivial patch which adds the __init/__exit macros to the module_init/ > > module_exit functions of > > > > drivers/ide/scc_pata.c > > > > Please have a look at the small patch and either pull it through > > your tree, or please ack' it so Jiri can pull it through the trivial > > tree. > > > > Patch against linux-next-tree, 22. Dez 08:38:18 CET 2009 > > but also present in linus tree. > > > > Signed-off-by: Peter Huewe > > --- > > drivers/ide/scc_pata.c | 4 ++-- > > 1 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c > > index 1104bb3..58c9c91 100644 > > --- a/drivers/ide/scc_pata.c > > +++ b/drivers/ide/scc_pata.c > > @@ -872,14 +872,14 @@ static struct pci_driver scc_pci_driver = { > > .remove = __devexit_p(scc_remove), > > }; > > > > -static int scc_ide_init(void) > > +static int __init scc_ide_init(void) > > { > > return ide_pci_register_driver(&scc_pci_driver); > > } > > > > module_init(scc_ide_init); > > /* -- No exit code? > > -static void scc_ide_exit(void) > > +static void __exit scc_ide_exit(void) > > { > > ide_pci_unregister_driver(&scc_pci_driver); > > } > > This code is commented out anyway. So we should either nuke it out > completely if it is not needed, or uncomment and fix. > > Bartlomiej, David? We can fix it nowadays, though I worry that by fixing it we may be 'creating competition' for 'officially blessed yet unmaintained' PATA stack... 8-) From: Bartlomiej Zolnierkiewicz Subject: [PATCH] scc_pata: fix module unloading scc_pata host driver predated module unloading support for IDE host drivers so even though it supports PCI hot-unplug and implements PCI device ->remove method it doesn't allow module removal. Fix it. Add missing __init/__exit tags to module_init/module_exit functions while at it (from Peter Huewe). Noticed-by: Jiri Kosina Cc: Peter Huewe Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/scc_pata.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: b/drivers/ide/scc_pata.c =================================================================== --- a/drivers/ide/scc_pata.c +++ b/drivers/ide/scc_pata.c @@ -872,20 +872,18 @@ static struct pci_driver scc_pci_driver .remove = __devexit_p(scc_remove), }; -static int scc_ide_init(void) +static int __init scc_ide_init(void) { return ide_pci_register_driver(&scc_pci_driver); } -module_init(scc_ide_init); -/* -- No exit code? -static void scc_ide_exit(void) +static void __exit scc_ide_exit(void) { - ide_pci_unregister_driver(&scc_pci_driver); + pci_unregister_driver(&scc_pci_driver); } -module_exit(scc_ide_exit); - */ +module_init(scc_ide_init); +module_exit(scc_ide_exit); MODULE_DESCRIPTION("PCI driver module for Toshiba SCC IDE"); MODULE_LICENSE("GPL");