All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave C Boutcher <sleddog@us.ibm.com>
To: Matthew Wilcox <willy@debian.org>
Cc: Greg KH <greg@kroah.com>, Patrick Mochel <mochel@osdl.org>,
	martins@au.ibm.com, linux-kernel@vger.kernel.org,
	linux-scsi@vger.kernel.org
Subject: Re: VPD in sysfs
Date: Fri, 20 Aug 2004 14:45:25 -0500	[thread overview]
Message-ID: <20040820194525.GA13970@cs.umn.edu> (raw)
In-Reply-To: <20040820142143.GB14144@parcelfarce.linux.theplanet.co.uk>

On Fri, Aug 20, 2004 at 03:21:43PM +0100, Matthew Wilcox wrote:
> On Sat, Aug 14, 2004 at 07:29:32PM +0100, Matthew Wilcox wrote:
> > Thoughts?  Since there's at least four and probably more ways of getting
> > at VPD, we either need to fill in some VPD structs at initialisation or
> > have some kind of vpd_ops that a driver can fill in so the core can get
> > at the data.
> 
> I've tried the first option -- creating a large block of sysfs entries for
> all the VPD entries that are present.  However, I've come upon a problem
> with sysfs that prevents me from doing so.
> 
> Basically, the problem is that sysfs doesn't pass the attribute that's
> being invoked to the attribute ->show method.  So I can't determine
> which one is being read.  This isn't a problem for any other sysfs attribute
> because they're all static, but for dynamically created attributes, it's
> not possible to work this way.

Ya, I ran into some similar restrictions with a driver I was
writing...after talking to gregkh, you are going to have to go down a
level and use kobjects directly...each piece of data will have a kobject, 
and that's what you dereference in the show method. 

-- 
Dave Boutcher

  reply	other threads:[~2004-08-20 19:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-14 18:29 VPD in sysfs Matthew Wilcox
2004-08-16  6:14 ` Martin Schwenke
2004-08-16 14:11 ` Luben Tuikov
2004-08-17  4:12 ` Douglas Gilbert
2004-08-20 14:21 ` Matthew Wilcox
2004-08-20 19:45   ` Dave C Boutcher [this message]
2004-08-24 19:09     ` Matthew Wilcox

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=20040820194525.GA13970@cs.umn.edu \
    --to=sleddog@us.ibm.com \
    --cc=boutcher@cs.umn.edu \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martins@au.ibm.com \
    --cc=mochel@osdl.org \
    --cc=willy@debian.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.