Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753231AbYJOHX7 (ORCPT ); Wed, 15 Oct 2008 03:23:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751862AbYJOHXv (ORCPT ); Wed, 15 Oct 2008 03:23:51 -0400 Received: from ti-out-0910.google.com ([209.85.142.186]:45124 "EHLO ti-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533AbYJOHXu (ORCPT ); Wed, 15 Oct 2008 03:23:50 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=G3IO9Cu3UZoGWijtR3elSiXfhK0j+uuvXBbRjJ/4v9+B8gjinl4y4+vY8Z0yCkXPed Nqfb8Fbv6Q1yx3j0ey7Oq1CKty/dTnO6haXq81/tZ14DkVGjbxAeBKE/iQMwhr9ie1x/ Fzxx7dNCd8jCTAotmWgOCyE01P3bO8ye2TLkM= Message-ID: Date: Wed, 15 Oct 2008 15:23:49 +0800 From: "Jike Song" To: linux-kernel@vger.kernel.org Subject: Re: Creating dev nodes from driver or via uevent? In-Reply-To: <20081015063917.GA18487@true> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081015063917.GA18487@true> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 815 Lines: 22 On Wed, Oct 15, 2008 at 2:39 PM, Fabiano Sidler wrote: > Hi folks! > > Probably a very basic question, but is it better to directly mknod from a > module's init funtion or to use the uevent/udev mechanism? If the latter, > are there good overviews, explanations and comprehensive code samples > especially for using udev, You can refer to any in-tree driver that calls class_create() and device_create_drvdata() afterwards. say drivers/char/raw.c LDD3 by Greg has some descriptions on this, but since the interface has changed.. -- Thanks, Jike -- 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/