lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110529134745.GA26524@suse.de>
Date:	Sun, 29 May 2011 21:47:45 +0800
From:	Greg KH <gregkh@...e.de>
To:	Chris Metcalf <cmetcalf@...era.com>
Cc:	linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
	Eric Biederman <ebiederm@...stanetworks.com>,
	Chris Wright <chrisw@...s-sol.org>,
	Benjamin Thery <benjamin.thery@...l.net>,
	Phil Carmody <ext-phil.2.carmody@...ia.com>
Subject: Re: [PATCH v2] arch/tile: add hypervisor-based character driver for
 SPI flash ROM

On Sun, May 29, 2011 at 08:18:36AM -0400, Chris Metcalf wrote:
> >> Is there a good example of a character device that has multiple minors and
> >> also is registered with sysfs?
> > Lots of them, look all over the kernel, and in LDD3 there's even an
> > outdated example of one I think.
> 
>  I didn't actually find many drivers that have both cdev_add with count>1,
> and mention sysfs or kobj, but char/raw.c is one that looks pretty clean. 
> (I found only four others total: uio/uio.c, s390/char/vmlogrdr.c,
> staging/comedi/comedi_fops.c, and staging/vme/devices/vme_user.c.)

No, you don't need "raw" kobjects or sysfs at all.  Just use the
device_create() call.

Hope this helps,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ