mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: johnlinn@comcast.net
To: linux-kernel@vger.kernel.org
Subject: using a single sysfs show function for multiple device attributes
Date: Wed, 29 Jun 2011 18:53:51 +0000 (UTC)	[thread overview]
Message-ID: <409519530.22419.1309373631423.JavaMail.root@sz0140a.emeryville.ca.mail.comcast.net> (raw)

In a platform driver, I'm trying to use a single function for multiple device attributes and use the attr input to ID which attribute.

After the driver is up and running, the sysfs attributes exist.  In my show function getting a device_attribute as an input, I never see the device attribute (attr) having anything in it (all 0s).  I see the attr pointer be valid, but pointing to all 0's.  

I don't see others using the attr input, but it seems like the way to ID which attribute is being accessed so that one show function can be used for many attributes.

I'm sure it's obvious, but I don't see what I'm doing wrong.

Thanks,
John

             reply	other threads:[~2011-06-29 18:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29 18:53 johnlinn [this message]
2011-06-29 20:00 ` Andi Kleen

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=409519530.22419.1309373631423.JavaMail.root@sz0140a.emeryville.ca.mail.comcast.net \
    --to=johnlinn@comcast.net \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®