All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Michael Hunold <hunold@convergence.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Problems adding sysfs support to dvb subsystem
Date: Mon, 12 Apr 2004 14:42:32 -0700	[thread overview]
Message-ID: <20040412214232.GA23692@kroah.com> (raw)
In-Reply-To: <407AFD5B.8010502@convergence.de>

On Mon, Apr 12, 2004 at 10:34:35PM +0200, Michael Hunold wrote:
> 
> What I'd like to have is something like this, so I can add attributes to 
> the frontend for example:
> /sys/class/dvb/adapter0/frontend0/
> 
> I wasn't able to find a driver that provides this simple "hierarchical" 
> order, so I did some experiments with little luck.
> 
> Creating this hierarchical order manually (like for "devfs") didn't 
> work, I get
> > find: /sys/class/dvb/adapter0/frontend0: No such file or directory
> errors upon access:
> 
> > sprintf((void*)&dvbdev->class_device.class_id, "adapter%d/%s%d", 
> adap->num, dnames[type], id);
> > class_device_register(&dvbdev->class_device);

No, you can't create subdirectories directly by just adding a '/' to the
name of the class device, sorry.  You will have to create a kobject for
the directory, and create the attributes in that kobject, like
networking did.

Yeah, it's a bit of a pain, but creating subdirectories in an easy
manner is on the TODO list for the driver core for 2.7.

If you want to get up and running quickly, which would not require you
to fix up any lifetime rules for your dvb drivers, you could implement
the class_simple interface, like a lot of other driver subsystems
currently are doing, and then in 2.7 convert over to a proper driver
model conversion.  I say this as I am only guessing as to what your
lifetime rules are for your dvb devices and drivers...

Hope this helps,

greg k-h

      parent reply	other threads:[~2004-04-12 21:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-12 20:34 Problems adding sysfs support to dvb subsystem Michael Hunold
2004-04-12 21:21 ` Stephen Hemminger
2004-04-12 21:42 ` Greg KH [this message]

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=20040412214232.GA23692@kroah.com \
    --to=greg@kroah.com \
    --cc=hunold@convergence.de \
    --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 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.