From: Greg KH <greg@kroah.com>
To: Mike Murphy <mamurph@cs.clemson.edu>
Cc: Oliver Neukum <oliver@neukum.org>,
linux-usb@vger.kernel.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: xpad.c - Xbox 360 wireless and sysfs support
Date: Mon, 16 Feb 2009 19:18:13 -0800 [thread overview]
Message-ID: <20090217031813.GD8343@kroah.com> (raw)
In-Reply-To: <5aa163d00902161853x27d98a83l3c2c02abe651fe1e@mail.gmail.com>
On Mon, Feb 16, 2009 at 09:53:54PM -0500, Mike Murphy wrote:
> struct usb_xpad {
> struct input_dev *dev; /* input device interface */
> struct usb_device *udev; /* usb device */
> ...
> };
>
> This is not my code... it was set up this way in the stable xpad driver.
And it is correct :)
> So it looks like I'm stuck with a struct input_dev * pointer to the
> input device, a struct device * pointer in the show/store handlers,
> and no way to get back to struct usb_xpad * with the container_of
> macro. Unless, of course, there is something I don't know about
> container_of (or another macro I can use in this instance).
input_set_drvdata() and input_get_drvdata() is what you are looking for.
Hope this helps,
greg k-h
next prev parent reply other threads:[~2009-02-17 3:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-15 4:08 [PATCH] input: xpad.c - Xbox 360 wireless and sysfs support Mike Murphy
2009-02-16 8:31 ` Oliver Neukum
2009-02-16 13:22 ` Mike Murphy
2009-02-16 15:21 ` Oliver Neukum
2009-02-19 4:04 ` Mike Murphy
2009-02-16 16:13 ` Greg KH
2009-02-16 18:09 ` Mike Murphy
2009-02-16 18:59 ` Greg KH
2009-02-16 19:30 ` Mike Murphy
2009-02-16 20:22 ` Greg KH
2009-02-17 2:53 ` Mike Murphy
2009-02-17 3:18 ` Greg KH [this message]
2009-02-17 4:57 ` Mike Murphy
2009-02-17 18:27 ` Mike Murphy
2009-02-17 18:39 ` 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=20090217031813.GD8343@kroah.com \
--to=greg@kroah.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mamurph@cs.clemson.edu \
--cc=oliver@neukum.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