linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Murphy <mamurph@cs.clemson.edu>
To: Greg KH <greg@kroah.com>
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 23:57:31 -0500	[thread overview]
Message-ID: <5aa163d00902162057l106c001bo519a5241c79b5e96@mail.gmail.com> (raw)
In-Reply-To: <20090217031813.GD8343@kroah.com>

On Mon, Feb 16, 2009 at 10:18 PM, Greg KH <greg@kroah.com> wrote:
>
> input_set_drvdata() and input_get_drvdata() is what you are looking for.
>

Thanks! That solved the problem at least as far as getting the entries
to show up in sysfs... though somehow now I'm having problems with the
I/O buffers, and a cat of the sysfs file shows no output (not even a
blank line). I added a couple printk's to one of the routines, and the
values are being read correctly from the data structure, but no
working I/O (cannot set the values either, per printk results). The
dmesg output shows the printk results, so the functions are getting
called. Even the count from sprintf is correct, and the resulting
buffer looks like it should... though with the extra blank line I
added in the last printk:

static ssize_t xpad_show_dead_zone(struct device *dev, char *buf)
{
	struct usb_xpad *xpad = to_xpad(dev);
	int count;
	printk(KERN_INFO "Dead zone is %d\n", xpad->dead_zone);
	count = sprintf(buf, "%d\n", xpad->dead_zone);
	printk(KERN_INFO "Count is %d\n", count);
	printk(KERN_INFO "Buffer is %s\n", buf);
	return count;
}

Unless that is some common error that is obvious from its description,
I will have to chase the bug down tomorrow or Wednesday. It's getting
a bit late here.

Thanks,
Mike
-- 
Mike Murphy
Ph.D. Candidate and NSF Graduate Research Fellow
Clemson University School of Computing
120 McAdams Hall
Clemson, SC 29634-0974 USA
Tel: +1 864.656.2838   Fax: +1 864.656.0145
http://cirg.cs.clemson.edu/~mamurph

  reply	other threads:[~2009-02-17  4:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5aa163d00902142008g138826br80d3ea989e7af691@mail.gmail.com>
2009-02-16  8:31 ` [PATCH] input: xpad.c - Xbox 360 wireless and sysfs support Oliver Neukum
     [not found]   ` <200902160931.34771.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2009-02-16 13:22     ` Mike Murphy
     [not found]       ` <5aa163d00902160522r3a22412je3f5202076f57a0a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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
     [not found]             ` <5aa163d00902161009l15dae120le96436d40f998d33-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-16 18:59               ` Greg KH
     [not found]                 ` <20090216185914.GA6239-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
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
2009-02-17  4:57                           ` Mike Murphy [this message]
2009-02-17 18:27                             ` Mike Murphy
     [not found]                               ` <5aa163d00902171027o139ba751r8103f948f3f492bb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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=5aa163d00902162057l106c001bo519a5241c79b5e96@mail.gmail.com \
    --to=mamurph@cs.clemson.edu \
    --cc=greg@kroah.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).