From: Greg KH <greg@kroah.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Linux PM <linux-pm@osdl.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC/RFT][PATCH -mm 2/5] swsusp: userland interface (rev. 2)
Date: Wed, 4 Jan 2006 16:26:19 -0800 [thread overview]
Message-ID: <20060105002619.GA16714@kroah.com> (raw)
In-Reply-To: <20060105001837.GA1751@elf.ucw.cz>
[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]
On Thu, Jan 05, 2006 at 01:18:37AM +0100, Pavel Machek wrote:
> Hi!
>
> > > +static int __init snapshot_dev_init(void)
> > > +{
> > > + int error;
> > > +
> > > + error = alloc_chrdev_region(&interface.devno, 0, 1, interface.name);
> > > + if (error)
> > > + return error;
> > > + cdev_init(&interface.cdev, &snapshot_fops);
> > > + interface.cdev.ops = &snapshot_fops;
> > > + error = cdev_add(&interface.cdev, interface.devno, 1);
> > > + if (error)
> > > + goto Unregister;
> > > + error = sysfs_create_file(&power_subsys.kset.kobj, &snapshot_attr.attr);
> >
> > Heh, that's a neat hack, register a sysfs file that contains the
> > major:minor (there is a function that will print that the correct way,
> > if you really want to do that), in sysfs. It's better to just register
> > a misc character device with the name "snapshot", and then udev will
> > create your userspace node with the proper major:minor all automatically
> > for you.
> >
> > Unless you want to turn these into syscalls :)
>
> Well, I think we simply want to get static major/minor allocated for
> this device. It really uses read/write, IIRC, so no, I do not think we
> want to make it a syscall.
Ok, then I'd recommend using the misc device, dynamic for now, and
reserve one when you get a bit closer to merging into mainline.
thanks,
greg k-h
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2006-01-05 0:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-04 22:40 [RFC/RFT][PATCH -mm 0/5] swsusp: userland interface (rev. 2) Rafael J. Wysocki
2006-01-04 22:47 ` [RFC/RFT][PATCH -mm 1/5] swsusp: swsusp: low level " Rafael J. Wysocki
2006-01-04 22:51 ` [RFC/RFT][PATCH -mm 2/5] swsusp: userland " Rafael J. Wysocki
2006-01-04 23:49 ` [linux-pm] " Greg KH
2006-01-05 0:18 ` Pavel Machek
2006-01-05 0:26 ` Greg KH [this message]
2006-01-05 0:54 ` Pavel Machek
2006-01-05 0:55 ` Pavel Machek
2006-01-05 23:34 ` Rafael J. Wysocki
2006-01-05 23:45 ` Greg KH
2006-01-04 22:53 ` [RFC/RFT][PATCH -mm 3/5] swsusp: separate swap-writing and reading code " Rafael J. Wysocki
2006-01-04 22:55 ` [RFC/RFT][PATCH -mm 4/5] swsusp: move highmem-handling code to swsusp.c " Rafael J. Wysocki
2006-01-04 22:56 ` [RFC/RFT][PATCH -mm 5/5] swsusp: userland interface documentation and config Rafael J. Wysocki
2006-01-05 1:05 ` [RFC/RFT][PATCH -mm 0/5] swsusp: userland interface (rev. 2) Pavel Machek
2006-01-05 23:30 ` Pavel Machek
2006-01-06 21:17 ` Rafael J. Wysocki
2006-01-06 22:44 ` Pavel Machek
2006-01-06 23:41 ` Rafael J. Wysocki
2006-01-06 23:59 ` Pavel Machek
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=20060105002619.GA16714@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@osdl.org \
--cc=pavel@ucw.cz \
/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