public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Greg KH <greg@kroah.com>
Cc: Al Viro <viro@ftp.linux.org.uk>, Takashi Iwai <tiwai@suse.de>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	cguthrie@mandriva.org
Subject: Re: [PATCH 1/2] chrdev: implement __[un]register_chrdev()
Date: Thu, 06 Aug 2009 02:01:56 +0900	[thread overview]
Message-ID: <4A79BB04.8000408@kernel.org> (raw)
In-Reply-To: <20090805164919.GA27457@kroah.com>

Greg KH wrote:
> On Thu, Aug 06, 2009 at 01:30:30AM +0900, Tejun Heo wrote:
>> Greg KH wrote:
>>> On Wed, Aug 05, 2009 at 03:35:42PM +0900, Tejun Heo wrote:
>>>> [un]register_chrdev() assume minor range 0-255.  This patch adds __
>>>> prefixed versions which take @minorbase and @count explicitly.
>>> What's the difference between this and the existing
>>> register_chrdev_region() function?  Why doesn't that work for you?
>>>
>>> What am I missing here?
>> The function names in char_dev.c are quite confusing.
> 
> That's an understatement :)

Yeah, it sure is.  It should have used a different verb at the very
least.

>> register_chrdev_region() only registers chrdev region.
>> register_chrdev() registers chrdev region and creates a cdev for the
>> region.  :-)
> 
> Yes, but you can use register_chrdev_region() and then call cdev_alloc()
> for the specific cdevs you need, right?  It's not the prettiest, but it
> should work.

Yeap, I can.  That's basically what register_chrdev() is.  If it had a
better name, adding a new variant would have been much nicer.  Having
the helper makes sense tho.  Names too confusing?

Thanks.

-- 
tejun

  reply	other threads:[~2009-08-05 17:00 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-05  6:35 [PATCH 1/2] chrdev: implement __[un]register_chrdev() Tejun Heo
2009-08-05  6:40 ` [PATCH 2/2] sound: make OSS device number claiming optional Tejun Heo
2009-08-05  9:15   ` Alan Cox
2009-08-05  9:24     ` Colin Guthrie
2009-08-05  9:59       ` Alan Cox
2009-08-05 10:14         ` Takashi Iwai
2009-08-05 10:26           ` Alan Cox
2009-08-05 10:45             ` Takashi Iwai
2009-08-05 11:15               ` Alan Cox
2009-08-05 11:34                 ` Tejun Heo
2009-08-05 12:35               ` Tejun Heo
2009-08-05 13:11                 ` Alan Cox
2009-08-05 14:16                   ` Tejun Heo
2009-08-05  9:32     ` Tejun Heo
2009-08-05 10:00       ` Alan Cox
2009-08-05 11:27         ` Tejun Heo
2009-08-05 12:48           ` Alan Cox
2009-08-05 14:13             ` Tejun Heo
2009-08-05 14:29               ` Alan Cox
2009-08-05 16:02                 ` Tejun Heo
2009-08-05 16:33                   ` Alan Cox
2009-08-05 16:38                     ` Alan Cox
2009-08-05 16:52                     ` Tejun Heo
2009-08-05 17:01                       ` Alan Cox
2009-08-06  5:55                         ` Tejun Heo
2009-08-05  7:04 ` [PATCH 1/2] chrdev: implement __[un]register_chrdev() Takashi Iwai
2009-08-05  7:11   ` Tejun Heo
2009-08-05  7:20     ` Takashi Iwai
2009-08-05  7:30       ` Tejun Heo
2009-08-05  9:01         ` [PATCH 1/2 UPDATED] " Tejun Heo
2009-08-05 16:16 ` [PATCH 1/2] " Greg KH
2009-08-05 16:30   ` Tejun Heo
2009-08-05 16:49     ` Greg KH
2009-08-05 17:01       ` Tejun Heo [this message]
2009-08-05 17:15         ` Greg KH
2009-08-06  5:52           ` Tejun Heo
2009-08-06  8:13             ` Tejun Heo
2009-08-06 19:58               ` Greg KH
2009-08-07  2:34                 ` Tejun Heo
2009-08-07  4:05                   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A79BB04.8000408@kernel.org \
    --to=tj@kernel.org \
    --cc=cguthrie@mandriva.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox