public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: linux-hotplug-devel@lists.sourceforge.net
Cc: Kay Sievers <kay.sievers@vrfy.org>, Greg KH <gregkh@suse.de>,
	Vojtech Pavlik <vojtech@suse.cz>,
	LKML <linux-kernel@vger.kernel.org>,
	Hannes Reinecke <hare@suse.de>
Subject: Re: Input sysbsystema and hotplug
Date: Mon, 13 Jun 2005 16:38:08 -0500	[thread overview]
Message-ID: <200506131638.09140.dtor_core@ameritech.net> (raw)
In-Reply-To: <20050613212654.GB11182@vrfy.org>

On Monday 13 June 2005 16:26, Kay Sievers wrote:
> On Mon, Jun 13, 2005 at 04:07:51PM -0500, Dmitry Torokhov wrote:
> > 
> > where inputX are class devices, mouse and event are subclasses of input
> > class and mouseX and eventX are again class devices.
> 
> We don't support childs of class devices until now. Would be nice maybe, but
> someone needs to add that to the driver-core first and we would need to make
> a bunch of userspace stuff aware of it ...
> 

Something like patch below will suffice I think (not tested).

-- 
Dmitry

 drivers/base/class.c   |    5 ++++-
 include/linux/device.h |    1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

Index: work/drivers/base/class.c
===================================================================
--- work.orig/drivers/base/class.c
+++ work/drivers/base/class.c
@@ -145,7 +145,10 @@ int class_register(struct class * cls)
 	if (error)
 		return error;
 
-	subsys_set_kset(cls, class_subsys);
+	if (cls->parent)
+		subsys_set_kset(cls, cls->parent->subsys);
+	else
+		subsys_set_kset(cls, class_subsys);
 
 	error = subsystem_register(&cls->subsys);
 	if (!error) {
Index: work/include/linux/device.h
===================================================================
--- work.orig/include/linux/device.h
+++ work/include/linux/device.h
@@ -145,6 +145,7 @@ struct class {
 	char			* name;
 
 	struct subsystem	subsys;
+	struct class		* parent;
 	struct list_head	children;
 	struct list_head	interfaces;
 	struct semaphore	sem;	/* locks both the children and interfaces lists */

  reply	other threads:[~2005-06-13 21:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200506131607.51736.dtor_core@ameritech.net>
2005-06-13 21:26 ` Input sysbsystema and hotplug Kay Sievers
2005-06-13 21:38   ` Dmitry Torokhov [this message]
2005-06-13 22:17     ` Greg KH
2005-06-14  6:14       ` Dmitry Torokhov
2005-06-13 21:58   ` Dmitry Torokhov
2005-06-13 22:05     ` Dmitry Torokhov
2005-06-13 22:15       ` Greg KH
2005-06-14  6:08         ` Dmitry Torokhov
2005-06-13 22:21       ` Kay Sievers
2005-06-14  7:32       ` Hannes Reinecke
2005-06-14  7:42         ` Dmitry Torokhov
2005-06-14  7:47           ` Hannes Reinecke
2005-06-14  7:56             ` Dmitry Torokhov
2005-06-19 14:46             ` David Brownell
2005-06-13 22:16 ` Greg KH
2005-06-14  4:26   ` Dmitry Torokhov
2005-06-14  6:21   ` Jon Smirl
2005-06-14  6:38     ` Greg KH
2005-06-14 13:41       ` Jon Smirl
2005-06-14 15:02       ` Jon Smirl
2005-06-14 18:16         ` Dmitry Torokhov
2005-06-14  7:43 ` Hannes Reinecke
2005-06-14  7:52   ` Dmitry Torokhov
2005-06-14  8:00     ` Hannes Reinecke

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=200506131638.09140.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=gregkh@suse.de \
    --cc=hare@suse.de \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-hotplug-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /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