[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d8035c8092a9401a766977a423c3f02c9c460ec5.camel@wdc.com>
Date: Tue, 12 Jun 2018 20:11:18 +0000
From: Bart Van Assche <Bart.VanAssche@....com>
To: "evgreen@...omium.org" <evgreen@...omium.org>,
Stanislav Nijnikov <Stanislav.Nijnikov@....com>
CC: "vinholikatti@...il.com" <vinholikatti@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
Avri Altman <Avri.Altman@....com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
Alex Lemberg <Alex.Lemberg@....com>,
"jejb@...ux.vnet.ibm.com" <jejb@...ux.vnet.ibm.com>,
"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
"gwendal@...omium.org" <gwendal@...omium.org>
Subject: Re: [PATCH 0/7] Enable UFS provisioning via Linux
On Tue, 2018-06-12 at 12:42 -0700, Evan Green wrote:
> What I _want_ to do is basically create N sysfs groups, where each
> group points to the same array of attributes. Then in the show/store
> methods, look up which group I'm in and use that as an index. But the
> show/store functions only pass the attributes themselves, and there
> seems to be no way for me to get the parent node.
The first argument that is passed to sysfs show and store methods is
a kobject pointer. Have you considered to access kobject.parent from
inside the show/store methods? From fs/sysfs/file.c:
if (ops->show) {
count = ops->show(kobj, of->kn->priv, buf);
if (count < 0)
return count;
}
Bart.
Powered by blists - more mailing lists