Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753260AbXLZWuo (ORCPT ); Wed, 26 Dec 2007 17:50:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751768AbXLZWuZ (ORCPT ); Wed, 26 Dec 2007 17:50:25 -0500 Received: from nat-132.atmel.no ([80.232.32.132]:61850 "EHLO relay.atmel.no" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751712AbXLZWuY (ORCPT ); Wed, 26 Dec 2007 17:50:24 -0500 Date: Wed, 26 Dec 2007 23:50:12 +0100 From: Haavard Skinnemoen To: Sam Ravnborg Cc: Adrian McMenamin , linux-kernel@vger.kernel.org Subject: Re: Correct use of __init and __devinit Message-ID: <20071226235012.04373e0d@siona> In-Reply-To: <20071224130143.GA27530@uranus.ravnborg.org> References: <8b67d60712230856o73bc89d7u142b93fc47b7533b@mail.gmail.com> <20071224130143.GA27530@uranus.ravnborg.org> Organization: Atmel X-Mailer: Claws Mail 2.10.0 (GTK+ 2.12.0; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 780 Lines: 20 On Mon, 24 Dec 2007 14:01:43 +0100 Sam Ravnborg wrote: > So of the principle of least suprise it is best to use __devinit > for the probe function as most other drivers do. And if > the driver model happens to call your probe function after > init time then we will not oops. If you're dealing with platform_devices, you can use platform_driver_probe() and remove the probe() function from the platform_driver struct to ensure this never happens. This is only ok for non-hotpluggable devices, of course. Haavard -- 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/