From: corbet@lwn.net (Jonathan Corbet)
To: "Hinko Kočevar" <hinko.kocevar@cetrtapot.si>
Cc: linux-kernel@vger.kernel.org
Subject: Re: register_chrdev vs. cdev_add
Date: Wed, 14 May 2008 08:01:35 -0600 [thread overview]
Message-ID: <16204.1210773695@vena.lwn.net> (raw)
In-Reply-To: Your message of "Wed, 14 May 2008 14:31:49 +0200." <482ADBB5.8050608@cetrtapot.si>
> dev = MKDEV(htrc110_major, htrc110_minor);
> ret = register_chrdev_region(dev, 1, mod_name);
> ret = register_chrdev(dev, mod_name, &htrc110_fops);
If you want to use register_chrdev(), do not make a separate call to
register_chrdev_region(). Those two are not meant to work together.
register_chrdev() implicitly allocates a region of 256 minors for you.
jon
prev parent reply other threads:[~2008-05-14 14:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 12:31 Hinko Kočevar
2008-05-14 14:01 ` Jonathan Corbet [this message]
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=16204.1210773695@vena.lwn.net \
--to=corbet@lwn.net \
--cc=hinko.kocevar@cetrtapot.si \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®