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]
Date:	Mon, 16 Feb 2009 12:22:15 -0800
From:	Greg KH <greg@...ah.com>
To:	Mike Murphy <mamurph@...clemson.edu>
Cc:	Oliver Neukum <oliver@...kum.org>, linux-usb@...r.kernel.org,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] input: xpad.c - Xbox 360 wireless and sysfs support

On Mon, Feb 16, 2009 at 02:30:01PM -0500, Mike Murphy wrote:
> On Mon, Feb 16, 2009 at 1:59 PM, Greg KH <greg@...ah.com> wrote:
> >
> > Put it on the logical device, as given to you.
> >
> >> I tried not to break existing functionality.  Additionally, struct
> >> usb_xpad contains two device pointers: one to the actual USB device,
> >> and one to an input device (see source of the in-tree xpad.c). So I
> >> followed your kobject.txt documentation and samples to create a new
> >> object whose sole purpose in life is to expose the sysfs interface,
> >> without interfering with the existing device entries in the driver.
> >> I'm not sure I see a clean way to use a single struct device here....
> >
> > Put it on the input device, which is what is the per-device thing.  It's
> > much simpler than creating a new struct kobject.  You can even create a
> > subdirectory for your attributes if you use an attribute group (which
> > you should be doing anyway, it's much simpler that way.)
> >
> 
> OK, one thing I'm not clear on: is there a clean API for adding
> attributes to an existing struct device, or do I need to "subclass" it
> (the C containment and delegation approach)?

device_create_file()

--
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