Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 15 Feb 2003 04:54:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 15 Feb 2003 04:54:35 -0500 Received: from caramon.arm.linux.org.uk ([212.18.232.186]:39184 "EHLO caramon.arm.linux.org.uk") by vger.kernel.org with ESMTP id ; Sat, 15 Feb 2003 04:54:34 -0500 Date: Sat, 15 Feb 2003 10:04:24 +0000 From: Russell King To: Bob Miller , Rusty Russell Cc: Lars Magne Ingebrigtsen , torvalds@transmeta.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2.5.60 5/9] Update the Archimedes parallel port driver for new module API. Message-ID: <20030215100424.A20365@flint.arm.linux.org.uk> Mail-Followup-To: Bob Miller , Rusty Russell , Lars Magne Ingebrigtsen , torvalds@transmeta.com, linux-kernel@vger.kernel.org References: <20030214235325.GH13336@doc.pdx.osdl.net> <20030215003700.GA13456@doc.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030215003700.GA13456@doc.pdx.osdl.net>; from rem@osdl.org on Fri, Feb 14, 2003 at 04:37:00PM -0800 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 986 Lines: 28 On Fri, Feb 14, 2003 at 04:37:00PM -0800, Bob Miller wrote: > -static void arc_inc_use_count(void) > +static int arc_inc_use_count(void) > { > -#ifdef MODULE > - MOD_INC_USE_COUNT; > -#endif > + return try_module_get(THIS_MODULE); > } Isn't one of the points of the module system that we don't try to run code inside a module without the module being reference counted? The normal way this is done is to add the module structure pointer into a structure, and run try_module_get() from code external to the module in question. The above method would seem to violate that. Rusty - comments? -- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/