Skip to contentSkip to conversation

sysfs class patch update [00/10]

PATCH In review Greg KH 6 participants 24 messages Jan 15, 2004 – Jan 20, 2004

Subsystems (5)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 sysfs class patch update [00/10]

Hi,

Here are 10 different patches, all against a clean 2.6.1. They update my previous sysfs class patches (and those should be dropped from the existing -mm tree). They fix the race condition in the previous ones, and add new support for raw and lp devices.

Andrew, can you please add these patches to your -mm tree? After some testing there, I'll feel good enough to push them to Linus.

thanks,

greg k-h

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#1 lore raw

PATCH 1/1 add class_simple support [01/10]

This patch adds a struct class_simple which can be used to create "simple" class support for subsystems.

It also adds a class_release() callback for struct class, as it is needed to properly handle the reference counting logic.

The following sysfs class patches all require this patch.

drivers/base/Makefile +1 -1
diff -Nru a/drivers/base/Makefile b/drivers/base/Makefile
@@ -1,7 +1,7 @@
 # Makefile for the Linux device tree
 
 obj-y			:= core.o sys.o interface.o bus.o \
-			   driver.o class.o platform.o \
+			   driver.o class.o class_simple.o platform.o \
 			   cpu.o firmware.o init.o map.o
 obj-y			+= power/
 obj-$(CONFIG_FW_LOADER)	+= firmware_class.o
drivers/base/class.c +14 -0
diff -Nru a/drivers/base/class.c b/drivers/base/class.c
@@ -46,6 +46,19 @@
 	return ret;
 }
 
+static void class_release(struct kobject * kobj)
+{
+	struct class *class = to_class(kobj);
+
+	pr_debug("class '%s': release.\n", class->name);
+
+	if (class->class_release)
+		class->class_release(class);
+	else
+		pr_debug("class '%s' does not have a release() function, "
+			 "be careful\n", class->name);
+}
+
 static struct sysfs_ops class_sysfs_ops = {
 	.show	= class_attr_show,
 	.store	= class_attr_store,
@@ -53,6 +66,7 @@
 
 static struct kobj_type ktype_class = {
 	.sysfs_ops	= &class_sysfs_ops,
+	.release	= class_release,
 };
 
 /* Hotplug events for classes go to the class_obj subsys */
drivers/base/class_simple.c new file +201 -0

201 lines not on this page · raw message

include/linux/device.h +9 -0
diff -Nru a/include/linux/device.h b/include/linux/device.h
@@ -46,6 +46,7 @@
 struct device_driver;
 struct class;
 struct class_device;
+struct class_simple;
 
 struct bus_type {
 	char			* name;
@@ -155,6 +156,7 @@
 			   int num_envp, char *buffer, int buffer_size);
 
 	void	(*release)(struct class_device *dev);
+	void	(*class_release)(struct class *class);
 };
 
 extern int class_register(struct class *);
@@ -246,6 +248,13 @@
 extern int class_interface_register(struct class_interface *);
 extern void class_interface_unregister(struct class_interface *);
 
+/* interface for class simple stuff */
+extern struct class_simple *class_simple_create(struct module *owner, char *name);
+extern void class_simple_destroy(struct class_simple *cs);
+extern struct class_device *class_simple_device_add(struct class_simple *cs, dev_t dev, struct device *device, const char *fmt, ...)
+	__attribute__((format(printf,4,5)));
+extern void class_simple_device_remove(dev_t dev);
+
 
 struct device {
 	struct list_head node;		/* node in sibling list */

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#2 lore raw

PATCH 1/1 add sysfs class support for input devices [02/10]

This patch adds support for all input devices. It also provides the "device" and "driver" symlink for all USB HID devices. Other input drivers should also provide this information if they can (but that can be added later.)

drivers/input/evdev.c +4 -0
diff -Nru a/drivers/input/evdev.c b/drivers/input/evdev.c
@@ -92,6 +92,7 @@
 static void evdev_free(struct evdev *evdev)
 {
 	devfs_remove("input/event%d", evdev->minor);
+	class_simple_device_remove(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor));
 	evdev_table[evdev->minor] = NULL;
 	kfree(evdev);
 }
@@ -426,6 +427,9 @@
 
 	devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
 			S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor);
+	class_simple_device_add(input_class, 
+				MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
+				dev->dev, "event%d", minor);
 
 	return &evdev->handle;
 }
drivers/input/input.c +3 -5
diff -Nru a/drivers/input/input.c b/drivers/input/input.c
@@ -720,15 +720,13 @@
 static inline int input_proc_init(void) { return 0; }
 #endif
 
-struct class input_class = {
-	.name		= "input",
-};
+struct class_simple *input_class;
 
 static int __init input_init(void)
 {
 	int retval = -ENOMEM;
 
-	class_register(&input_class);
+	input_class = class_simple_create(THIS_MODULE, "input");
 	input_proc_init();
 	retval = register_chrdev(INPUT_MAJOR, "input", &input_fops);
 	if (retval) {
@@ -757,7 +755,7 @@
 
 	devfs_remove("input");
 	unregister_chrdev(INPUT_MAJOR, "input");
-	class_unregister(&input_class);
+	class_simple_destroy(input_class);
 }
 
 subsys_initcall(input_init);
drivers/input/joydev.c +4 -0
diff -Nru a/drivers/input/joydev.c b/drivers/input/joydev.c
@@ -145,6 +145,7 @@
 {
 	devfs_remove("js%d", joydev->minor);
 	joydev_table[joydev->minor] = NULL;
+	class_simple_device_remove(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor));
 	kfree(joydev);
 }
 
@@ -444,6 +445,9 @@
 	
 	devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
 			S_IFCHR|S_IRUGO|S_IWUSR, "js%d", minor);
+	class_simple_device_add(input_class, 
+				MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
+				dev->dev, "js%d", minor);
 
 	return &joydev->handle;
 }
drivers/input/mousedev.c +7 -1
diff -Nru a/drivers/input/mousedev.c b/drivers/input/mousedev.c
@@ -203,6 +203,7 @@
 static void mousedev_free(struct mousedev *mousedev)
 {
 	devfs_remove("input/mouse%d", mousedev->minor);
+	class_simple_device_remove(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor));
 	mousedev_table[mousedev->minor] = NULL;
 	kfree(mousedev);
 }
@@ -464,6 +465,9 @@
 
 	devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
 			S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor);
+	class_simple_device_add(input_class, 
+				MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
+				dev->dev, "mouse%d", minor);
 
 	return &mousedev->handle;
 }
@@ -542,7 +546,8 @@
 
 	devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX),
 			S_IFCHR|S_IRUGO|S_IWUSR, "input/mice");
-
+	class_simple_device_add(input_class, MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX),
+				NULL, "mice");
 
 #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
 	if (!(mousedev_mix.misc = !misc_register(&psaux_mouse)))
@@ -561,6 +566,7 @@
 		misc_deregister(&psaux_mouse);
 #endif
 	devfs_remove("input/mice");
+	class_simple_device_remove(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX));
 	input_unregister_handler(&mousedev_handler);
 }
 
drivers/input/tsdev.c +4 -0
diff -Nru a/drivers/input/tsdev.c b/drivers/input/tsdev.c
@@ -119,6 +119,7 @@
 static void tsdev_free(struct tsdev *tsdev)
 {
 	devfs_remove("input/ts%d", tsdev->minor);
+	class_simple_device_remove(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor));
 	tsdev_table[tsdev->minor] = NULL;
 	kfree(tsdev);
 }
@@ -333,6 +334,9 @@
 	
 	devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
 			S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor);
+	class_simple_device_add(input_class, 
+				MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
+				dev->dev, "ts%d", minor);
 
 	return &tsdev->handle;
 }
include/linux/input.h +2 -1
diff -Nru a/include/linux/input.h b/include/linux/input.h
@@ -809,6 +809,7 @@
 	int (*erase_effect)(struct input_dev *dev, int effect_id);
 
 	struct input_handle *grab;
+	struct device *dev;
 
 	struct list_head	h_list;
 	struct list_head	node;
@@ -921,7 +922,7 @@
 #define input_regs(a,b)		do { (a)->regs = (b); } while (0)
 #define input_sync(a)		do { input_event(a, EV_SYN, SYN_REPORT, 0); (a)->regs = NULL; } while (0)
 
-extern struct class input_class;
+extern struct class_simple *input_class;
 
 #endif
 #endif

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#3 lore raw

PATCH 1/1 add class support for lp devices [03/10]

Add class support for lp devices.

Based on a patch from Hanna Linder <[email protected]>

drivers/char/lp.c +6 -0
diff -Nru a/drivers/char/lp.c b/drivers/char/lp.c
@@ -145,6 +145,7 @@
 struct lp_struct lp_table[LP_NO];
 
 static unsigned int lp_count = 0;
+static struct class_simple *lp_class;
 
 #ifdef CONFIG_LP_CONSOLE
 static struct parport *console_registered; // initially NULL
@@ -795,6 +796,8 @@
 	if (reset)
 		lp_reset(nr);
 
+	class_simple_device_add(lp_class, MKDEV(LP_MAJOR, nr), NULL,
+				"lp%d", nr);
 	devfs_mk_cdev(MKDEV(LP_MAJOR, nr), S_IFCHR | S_IRUGO | S_IWUGO,
 			"printers/%d", nr);
 
@@ -897,6 +900,7 @@
 	}
 
 	devfs_mk_dir("printers");
+	lp_class = class_simple_create(THIS_MODULE, "printer");
 
 	if (parport_register_driver (&lp_driver)) {
 		printk (KERN_ERR "lp: unable to register with parport\n");
@@ -958,8 +962,10 @@
 			continue;
 		parport_unregister_device(lp_table[offset].dev);
 		devfs_remove("printers/%d", offset);
+		class_simple_device_remove(MKDEV(LP_MAJOR, offset));
 	}
 	devfs_remove("printers");
+	class_simple_destroy(lp_class);
 }
 
 __setup("lp=", lp_setup);

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#4 lore raw

PATCH 1/1 add sysfs class support for mem devices [04/10]

This adds class/mem/ for all memory devices (random, raw, null, etc.)

drivers/char/mem.c +7 -0
diff -Nru a/drivers/char/mem.c b/drivers/char/mem.c
@@ -24,6 +24,7 @@
 #include <linux/smp_lock.h>
 #include <linux/devfs_fs_kernel.h>
 #include <linux/ptrace.h>
+#include <linux/device.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -676,6 +677,8 @@
 	{11,"kmsg",    S_IRUGO | S_IWUSR,           &kmsg_fops},
 };
 
+static struct class_simple *mem_class;
+
 static int __init chr_dev_init(void)
 {
 	int i;
@@ -683,7 +686,11 @@
 	if (register_chrdev(MEM_MAJOR,"mem",&memory_fops))
 		printk("unable to get major %d for memory devs\n", MEM_MAJOR);
 
+	mem_class = class_simple_create(THIS_MODULE, "mem");
 	for (i = 0; i < ARRAY_SIZE(devlist); i++) {
+		class_simple_device_add(mem_class,
+					MKDEV(MEM_MAJOR, devlist[i].minor),
+					NULL, devlist[i].name);
 		devfs_mk_cdev(MKDEV(MEM_MAJOR, devlist[i].minor),
 				S_IFCHR | devlist[i].mode, devlist[i].name);
 	}

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#5 lore raw

PATCH 1/1 add sysfs class support for misc devices [05/10]

This adds class/misc/ for all misc devices (ones that use the misc_register() function).

drivers/char/misc.c +15 -2
diff -Nru a/drivers/char/misc.c b/drivers/char/misc.c
@@ -47,7 +47,7 @@
 #include <linux/devfs_fs_kernel.h>
 #include <linux/stat.h>
 #include <linux/init.h>
-
+#include <linux/device.h>
 #include <linux/tty.h>
 #include <linux/kmod.h>
 
@@ -180,6 +180,13 @@
 	return err;
 }
 
+/* 
+ * TODO for 2.7:
+ *  - add a struct class_device to struct miscdevice and make all usages of
+ *    them dynamic.
+ */
+static struct class_simple *misc_class;
+
 static struct file_operations misc_fops = {
 	.owner		= THIS_MODULE,
 	.open		= misc_open,
@@ -234,6 +241,8 @@
 				"misc/%s", misc->name);
 	}
 
+	class_simple_device_add(misc_class, MKDEV(MISC_MAJOR, misc->minor),
+				misc->dev, misc->name);
 	devfs_mk_cdev(MKDEV(MISC_MAJOR, misc->minor),
 			S_IFCHR|S_IRUSR|S_IWUSR|S_IRGRP, misc->devfs_name);
 
@@ -265,6 +274,7 @@
 
 	down(&misc_sem);
 	list_del(&misc->list);
+	class_simple_device_remove(MKDEV(MISC_MAJOR, misc->minor));
 	devfs_remove(misc->devfs_name);
 	if (i < DYNAMIC_MINORS && i>0) {
 		misc_minors[i>>3] &= ~(1 << (misc->minor & 7));
@@ -285,6 +295,9 @@
 	if (ent)
 		ent->proc_fops = &misc_proc_fops;
 #endif
+	misc_class = class_simple_create(THIS_MODULE, "misc");
+	if (IS_ERR(misc_class))
+		return PTR_ERR(misc_class);
 #ifdef CONFIG_MVME16x
 	rtc_MK48T08_init();
 #endif
@@ -319,4 +332,4 @@
 	}
 	return 0;
 }
-module_init(misc_init);
+subsys_initcall(misc_init);
include/linux/miscdevice.h +3 -0
diff -Nru a/include/linux/miscdevice.h b/include/linux/miscdevice.h
@@ -36,12 +36,15 @@
 
 #define TUN_MINOR	     200
 
+struct device;
+
 struct miscdevice 
 {
 	int minor;
 	const char *name;
 	struct file_operations *fops;
 	struct list_head list;
+	struct device *dev;
 	char devfs_name[64];
 };
 

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#6 lore raw

PATCH 1/1 add sysfs class support for raw devices [06/10]

This adds class/raw/ support for all raw devices. It also provides a symlink to the block device that the raw device is mapped to. For example:

$ tree /sys/class/raw/
/sys/class/raw/
|-- raw1
|   |-- dev
|   `-- device -> ../../../block/sda
|-- raw2
|   |-- dev
|   `-- device -> ../../../block/sda/sda2
`-- rawctl
    `-- dev

Note, in order to get that symlink, I had to export get_gendisk() so that modules can use it. I hope this is ok with everyone.

This is based on a patch originally written by
Leann Ogasawara <[email protected]>

drivers/block/genhd.c +2 -0
diff -Nru a/drivers/block/genhd.c b/drivers/block/genhd.c
@@ -224,6 +224,8 @@
 	return  kobj ? to_disk(kobj) : NULL;
 }
 
+EXPORT_SYMBOL(get_gendisk);
+
 #ifdef CONFIG_PROC_FS
 /* iterator */
 static void *part_start(struct seq_file *part, loff_t *pos)
drivers/char/raw.c +40 -1

82 lines not on this page · raw message

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#7 lore raw

PATCH 1/1 add sysfs class support for OSS sound devices [07/10]

This patch adds support for all OSS sound devices.

This patch is based on a work originally written by Leann Ogasawara <[email protected]>

sound/oss/soundcard.c +12 -1
diff -Nru a/sound/oss/soundcard.c b/sound/oss/soundcard.c
@@ -73,6 +73,7 @@
 
 
 unsigned long seq_time = 0;	/* Time for /dev/sequencer */
+extern struct class_simple *sound_class;
 
 /*
  * Table for configurable mixer volume handling
@@ -569,6 +570,9 @@
 		devfs_mk_cdev(MKDEV(SOUND_MAJOR, dev_list[i].minor),
 				S_IFCHR | dev_list[i].mode,
 				"sound/%s", dev_list[i].name);
+		class_simple_device_add(sound_class, 
+					MKDEV(SOUND_MAJOR, dev_list[i].minor),
+					NULL, "%s", dev_list[i].name);
 
 		if (!dev_list[i].num)
 			continue;
@@ -578,6 +582,10 @@
 						dev_list[i].minor + (j*0x10)),
 					S_IFCHR | dev_list[i].mode,
 					"sound/%s%d", dev_list[i].name, j);
+			class_simple_device_add(sound_class,
+					MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)),
+					NULL,
+					"%s%d", dev_list[i].name, j);
 		}
 	}
 
@@ -593,10 +601,13 @@
 
 	for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) {
 		devfs_remove("sound/%s", dev_list[i].name);
+		class_simple_device_remove(MKDEV(SOUND_MAJOR, dev_list[i].minor));
 		if (!dev_list[i].num)
 			continue;
-		for (j = 1; j < *dev_list[i].num; j++)
+		for (j = 1; j < *dev_list[i].num; j++) {
 			devfs_remove("sound/%s%d", dev_list[i].name, j);
+			class_simple_device_remove(MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)));
+		}
 	}
 	
 	unregister_sound_special(1);
sound/sound_core.c +10 -0
diff -Nru a/sound/sound_core.c b/sound/sound_core.c
@@ -65,6 +65,9 @@
 extern int msnd_pinnacle_init(void);
 #endif
 
+struct class_simple *sound_class;
+EXPORT_SYMBOL(sound_class);
+
 /*
  *	Low level list operator. Scan the ordered list, find a hole and
  *	join into it. Called with the lock asserted
@@ -171,6 +174,8 @@
 
 	devfs_mk_cdev(MKDEV(SOUND_MAJOR, s->unit_minor),
 			S_IFCHR | mode, s->name);
+	class_simple_device_add(sound_class, MKDEV(SOUND_MAJOR, s->unit_minor),
+				NULL, s->name+6);
 	return r;
 
  fail:
@@ -193,6 +198,7 @@
 	spin_unlock(&sound_loader_lock);
 	if (p) {
 		devfs_remove(p->name);
+		class_simple_device_remove(MKDEV(SOUND_MAJOR, p->unit_minor));
 		kfree(p);
 	}
 }
@@ -556,6 +562,7 @@
 	   empty */
 	unregister_chrdev(SOUND_MAJOR, "sound");
 	devfs_remove("sound");
+	class_simple_destroy(sound_class);
 }
 
 static int __init init_soundcore(void)
@@ -565,6 +572,9 @@
 		return -EBUSY;
 	}
 	devfs_mk_dir ("sound");
+	sound_class = class_simple_create(THIS_MODULE, "sound");
+	if (IS_ERR(sound_class))
+		return PTR_ERR(sound_class);
 
 	return 0;
 }

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#8 lore raw

PATCH 1/1 add sysfs class support for ALSA sound devices [08/10]

This patch adds support for all ALSA sound devices. The previous OSS sound patch is required for this one to work properly.

This patch is based on a work originally written by Leann Ogasawara <[email protected]>

include/sound/core.h +1 -0
diff -Nru a/include/sound/core.h b/include/sound/core.h
@@ -160,6 +160,7 @@
 	int shutdown;			/* this card is going down */
 	wait_queue_head_t shutdown_sleep;
 	struct work_struct free_workq;	/* for free in workqueue */
+	struct device *dev;
 
 #ifdef CONFIG_PM
 	int (*set_power_state) (snd_card_t *card, unsigned int state);
sound/core/sound.c +20 -14
diff -Nru a/sound/core/sound.c b/sound/core/sound.c
@@ -38,9 +38,7 @@
 static int major = CONFIG_SND_MAJOR;
 int snd_major;
 static int cards_limit = SNDRV_CARDS;
-#ifdef CONFIG_DEVFS_FS
 static int device_mode = S_IFCHR | S_IRUGO | S_IWUGO;
-#endif
 
 MODULE_AUTHOR("Jaroslav Kysela <[email protected]>");
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture driver for soundcards.");
@@ -66,6 +64,7 @@
 
 static DECLARE_MUTEX(sound_mutex);
 
+extern struct class_simple *sound_class;
 #ifdef CONFIG_KMOD
 
 /**
@@ -203,6 +202,7 @@
 {
 	int minor = snd_kernel_minor(type, card, dev);
 	snd_minor_t *preg;
+	struct device *device = NULL;
 
 	if (minor < 0)
 		return minor;
@@ -221,10 +221,14 @@
 		return -EBUSY;
 	}
 	list_add_tail(&preg->list, &snd_minors_hash[SNDRV_MINOR_CARD(minor)]);
-#ifdef CONFIG_DEVFS_FS
-	if (strncmp(name, "controlC", 8))     /* created in sound.c */
+
+	if (strncmp(name, "controlC", 8)) {	/* created in sound.c */
 		devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name);
-#endif
+		if (card)
+			device = card->dev;
+		class_simple_device_add(sound_class, MKDEV(major, minor), device, name);
+	}
+
 	up(&sound_mutex);
 	return 0;
 }
@@ -252,10 +256,12 @@
 		up(&sound_mutex);
 		return -EINVAL;
 	}
-#ifdef CONFIG_DEVFS_FS
-	if (strncmp(mptr->name, "controlC", 8))	/* created in sound.c */
+
+	if (strncmp(mptr->name, "controlC", 8)) {	/* created in sound.c */
 		devfs_remove("snd/%s", mptr->name);
-#endif
+		class_simple_device_remove(MKDEV(major, minor));
+	}
+
 	list_del(&mptr->list);
 	up(&sound_mutex);
 	kfree(mptr);
@@ -322,9 +328,7 @@
 
 static int __init alsa_sound_init(void)
 {
-#ifdef CONFIG_DEVFS_FS
 	short controlnum;
-#endif
 #ifdef CONFIG_SND_OSSEMUL
 	int err;
 #endif
@@ -358,10 +362,10 @@
 #ifdef CONFIG_SND_OSSEMUL
 	snd_info_minor_register();
 #endif
-#ifdef CONFIG_DEVFS_FS
-	for (controlnum = 0; controlnum < cards_limit; controlnum++) 
+	for (controlnum = 0; controlnum < cards_limit; controlnum++) {
 		devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum);
-#endif
+		class_simple_device_add(sound_class, MKDEV(major, controlnum<<5), NULL, "controlC%d", controlnum);
+	}
 #ifndef MODULE
 	printk(KERN_INFO "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n");
 #endif
@@ -372,8 +376,10 @@
 {
 	short controlnum;
 
-	for (controlnum = 0; controlnum < cards_limit; controlnum++)
+	for (controlnum = 0; controlnum < cards_limit; controlnum++) {
 		devfs_remove("snd/controlC%d", controlnum);
+		class_simple_device_remove(MKDEV(major, controlnum<<5));
+	}
 
 #ifdef CONFIG_SND_OSSEMUL
 	snd_info_minor_unregister();
sound/pci/intel8x0.c +1 -0
diff -Nru a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
@@ -2591,6 +2591,7 @@
 			break;
 		}
 	}
+	card->dev = &pci->dev;
 
 	if ((err = snd_intel8x0_create(card, pci, pci_id->driver_data, &chip)) < 0) {
 		snd_card_free(card);

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#9 lore raw

PATCH 1/1 clean up sysfs class support for tty devices [09/10]

This patch ports the existing tty class support to the class_simple interface, saving a lot of code in the process.

drivers/char/tty_io.c +11 -80
diff -Nru a/drivers/char/tty_io.c b/drivers/char/tty_io.c
@@ -2069,79 +2069,7 @@
 	tty->driver->write(tty, 0, &ch, 1);
 }
 
-struct tty_dev {
-	struct list_head node;
-	dev_t dev;
-	struct class_device class_dev;
-};
-#define to_tty_dev(d) container_of(d, struct tty_dev, class_dev)
-
-static void release_tty_dev(struct class_device *class_dev)
-{
-	struct tty_dev *tty_dev = to_tty_dev(class_dev);
-	kfree(tty_dev);
-}
-
-static struct class tty_class = {
-	.name		= "tty",
-	.release	= &release_tty_dev,
-};
-
-static LIST_HEAD(tty_dev_list);
-static spinlock_t tty_dev_list_lock = SPIN_LOCK_UNLOCKED;
-
-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
-	struct tty_dev *tty_dev = to_tty_dev(class_dev);
-	return print_dev_t(buf, tty_dev->dev);
-}
-static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
-
-static void tty_add_class_device(char *name, dev_t dev, struct device *device)
-{
-	struct tty_dev *tty_dev = NULL;
-	int retval;
-
-	tty_dev = kmalloc(sizeof(*tty_dev), GFP_KERNEL);
-	if (!tty_dev)
-		return;
-	memset(tty_dev, 0x00, sizeof(*tty_dev));
-
-	tty_dev->class_dev.dev = device;
-	tty_dev->class_dev.class = &tty_class;
-	snprintf(tty_dev->class_dev.class_id, BUS_ID_SIZE, "%s", name);
-	retval = class_device_register(&tty_dev->class_dev);
-	if (retval)
-		goto error;
-	class_device_create_file (&tty_dev->class_dev, &class_device_attr_dev);
-	tty_dev->dev = dev;
-	spin_lock(&tty_dev_list_lock);
-	list_add(&tty_dev->node, &tty_dev_list);
-	spin_unlock(&tty_dev_list_lock);
-	return;
-error:
-	kfree(tty_dev);
-}
-
-static void tty_remove_class_device(dev_t dev)
-{
-	struct tty_dev *tty_dev = NULL;
-	struct list_head *tmp;
-	int found = 0;
-
-	spin_lock(&tty_dev_list_lock);
-	list_for_each (tmp, &tty_dev_list) {
-		tty_dev = list_entry(tmp, struct tty_dev, node);
-		if (tty_dev->dev = dev) {
-			list_del(&tty_dev->node);
-			found = 1;
-			break;
-		}
-	}
-	spin_unlock(&tty_dev_list_lock);
-	if (found)
-		class_device_unregister(&tty_dev->class_dev);
-}
+static struct class_simple *tty_class;
 
 /**
  * tty_register_device - register a tty device
@@ -2174,7 +2102,7 @@
 	if (driver->type != TTY_DRIVER_TYPE_PTY) {
 		char name[64];
 		tty_line_name(driver, index, name);
-		tty_add_class_device(name, dev, device);
+		class_simple_device_add(tty_class, dev, device, name);
 	}
 }
 
@@ -2189,7 +2117,7 @@
 void tty_unregister_device(struct tty_driver *driver, unsigned index)
 {
 	devfs_remove("%s%d", driver->devfs_name, index + driver->name_base);
-	tty_remove_class_device(MKDEV(driver->major, driver->minor_start) + index);
+	class_simple_device_remove(MKDEV(driver->major, driver->minor_start) + index);
 }
 
 EXPORT_SYMBOL(tty_register_device);
@@ -2406,7 +2334,10 @@
 
 static int __init tty_class_init(void)
 {
-	return class_register(&tty_class);
+	tty_class = class_simple_create(THIS_MODULE, "tty");
+	if (IS_ERR(tty_class))
+		return PTR_ERR(tty_class);
+	return 0;
 }
 
 postcore_initcall(tty_class_init);
@@ -2431,7 +2362,7 @@
 	    register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
 		panic("Couldn't register /dev/tty driver\n");
 	devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty");
-	tty_add_class_device ("tty", MKDEV(TTYAUX_MAJOR, 0), NULL);
+	class_simple_device_add(tty_class, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty");
 
 	strcpy(console_cdev.kobj.name, "dev.console");
 	cdev_init(&console_cdev, &console_fops);
@@ -2439,7 +2370,7 @@
 	    register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0)
 		panic("Couldn't register /dev/console driver\n");
 	devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console");
-	tty_add_class_device ("console", MKDEV(TTYAUX_MAJOR, 1), NULL);
+	class_simple_device_add(tty_class, MKDEV(TTYAUX_MAJOR, 1), NULL, "console");
 
 	tty_kobj.kset = tty_cdev.kobj.kset;
 	kobject_register(&tty_kobj);
@@ -2451,7 +2382,7 @@
 	    register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
 		panic("Couldn't register /dev/ptmx driver\n");
 	devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx");
-	tty_add_class_device ("ptmx", MKDEV(TTYAUX_MAJOR, 2), NULL);
+	class_simple_device_add(tty_class, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx");
 #endif
 	
 #ifdef CONFIG_VT
@@ -2461,7 +2392,7 @@
 	    register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
 		panic("Couldn't register /dev/tty0 driver\n");
 	devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0");
-	tty_add_class_device ("tty0", MKDEV(TTY_MAJOR, 0), NULL);
+	class_simple_device_add(tty_class, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
 
 	vty_init();
 #endif

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#10 lore raw

PATCH 1/1 add sysfs class support for vc devices [10/10]

This patch add sysfs support for vc char devices.

Note, Andrew Morton has reported some very strange oopses with this patch, that I can not reproduce at all. If anyone else also has problems with this patch, please let me know.

drivers/char/vc_screen.c +10 -0
diff -Nru a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c
@@ -36,6 +36,7 @@
 #include <linux/kbd_kern.h>
 #include <linux/console.h>
 #include <linux/smp_lock.h>
+#include <linux/device.h>
 #include <asm/uaccess.h>
 #include <asm/byteorder.h>
 #include <asm/unaligned.h>
@@ -469,6 +470,8 @@
 	.open		= vcs_open,
 };
 
+static struct class_simple *vc_class;
+
 void vcs_make_devfs(struct tty_struct *tty)
 {
 	devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 1),
@@ -477,19 +480,26 @@
 	devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 129),
 			S_IFCHR|S_IRUSR|S_IWUSR,
 			"vcc/a%u", tty->index + 1);
+	class_simple_device_add(vc_class, MKDEV(VCS_MAJOR, tty->index + 1), NULL, "vcs%u", tty->index + 1);
+	class_simple_device_add(vc_class, MKDEV(VCS_MAJOR, tty->index + 129), NULL, "vcsa%u", tty->index + 1);
 }
 void vcs_remove_devfs(struct tty_struct *tty)
 {
 	devfs_remove("vcc/%u", tty->index + 1);
 	devfs_remove("vcc/a%u", tty->index + 1);
+	class_simple_device_remove(MKDEV(VCS_MAJOR, tty->index + 1));
+	class_simple_device_remove(MKDEV(VCS_MAJOR, tty->index + 129));
 }
 
 int __init vcs_init(void)
 {
 	if (register_chrdev(VCS_MAJOR, "vcs", &vcs_fops))
 		panic("unable to get major %d for vcs device", VCS_MAJOR);
+	vc_class = class_simple_create(THIS_MODULE, "vc");
 
 	devfs_mk_cdev(MKDEV(VCS_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/0");
 	devfs_mk_cdev(MKDEV(VCS_MAJOR, 128), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/a0");
+	class_simple_device_add(vc_class, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
+	class_simple_device_add(vc_class, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
 	return 0;
 }
drivers/char/vt.c +2 -1
diff -Nru a/drivers/char/vt.c b/drivers/char/vt.c
@@ -2539,6 +2539,8 @@
 
 int __init vty_init(void)
 {
+	vcs_init();
+
 	console_driver = alloc_tty_driver(MAX_NR_CONSOLES);
 	if (!console_driver)
 		panic("Couldn't allocate console driver\n");
@@ -2566,7 +2568,6 @@
 #ifdef CONFIG_FRAMEBUFFER_CONSOLE
 	fb_console_init();
 #endif	
-	vcs_init();
 	return 0;
 }
 

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#11 lore raw

Re: [PATCH] add sysfs class support for vc devices [10/10]

Quoted 6 lines · Greg KH

This patch add sysfs support for vc char devices.

Note, Andrew Morton has reported some very strange oopses with this patch, that I can not reproduce at all. If anyone else also has problems with this patch, please let me know.

It seems to have magically healed itself :(

Several people were hitting it. We shall see.

#12 lore raw

Re: [PATCH] add sysfs class support for vc devices [10/10]

Quoted 11 lines · Andrew Morton
Quoted 6 lines · Greg KH

This patch add sysfs support for vc char devices.

Note, Andrew Morton has reported some very strange oopses with this patch, that I can not reproduce at all. If anyone else also has problems with this patch, please let me know.

It seems to have magically healed itself :(

Several people were hitting it. We shall see.

Might it be due to the vt-locking-fixes patch?

Signature · 1 line
Martin Schlemmer
#13 lore raw

Re: [PATCH] add sysfs class support for vc devices [10/10]

Quoted 10 lines · Martin Schlemmer
Quoted 8 lines · Andrew Morton
Quoted 6 lines · Greg KH

This patch add sysfs support for vc char devices.

Note, Andrew Morton has reported some very strange oopses with this patch, that I can not reproduce at all. If anyone else also has problems with this patch, please let me know.

Quoted 6 lines
Quoted 3 lines

It seems to have magically healed itself :(

Several people were hitting it. We shall see.

Might it be due to the vt-locking-fixes patch?

No, I was able to reproduce the oops with just two of Greg's patches on bare 2.6.1-rcX.

It was some refcounting problem in the tty layer. 100% deterministic, not a race.

#14 lore raw

Re: [PATCH] add sysfs class support for vc devices [10/10]

Quoted 15 lines · Andrew Morton
Quoted 14 lines · Martin Schlemmer
Quoted 11 lines · Andrew Morton
Quoted 6 lines · Greg KH

This patch add sysfs support for vc char devices.

Note, Andrew Morton has reported some very strange oopses with this patch, that I can not reproduce at all. If anyone else also has problems with this patch, please let me know.

It seems to have magically healed itself :(

Several people were hitting it. We shall see.

Quoted 8 lines
Quoted 2 lines

Might it be due to the vt-locking-fixes patch?

No, I was able to reproduce the oops with just two of Greg's patches on bare 2.6.1-rcX.

It was some refcounting problem in the tty layer. 100% deterministic, not a race.

No, I meant that fixed it. The locking patch was added _after_ you removed the vc patch ...

Signature · 1 line
Martin Schlemmer
#15 lore raw

Re: [PATCH] add sysfs class support for ALSA sound devices [08/10]

In reply to Greg KH
Quoted 2 lines · Greg KH

This patch adds support for all ALSA sound devices. The previous OSS sound patch is required for this one to work properly.

This doesn't apply cleanly to the latest ALSA (1.0.1). It's no problem to do it manually, though.

sound/pci/intel8x0.c line 2594

Quoted 8 lines

diff -Nru a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c

sound/pci/intel8x0.c +1 -0
@@ -2591,6 +2591,7 @@
 			break;
 		}
 	}
+	card->dev = &pci->dev;

Does this need to be done for all drivers?

Signature · 14 lines
Måns Rullgård
[email protected]



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
author
#16 lore raw

Re: [PATCH] add sysfs class support for ALSA sound devices [08/10]

Quoted 8 lines · Måns Rullgård
Quoted 2 lines · Greg KH

This patch adds support for all ALSA sound devices. The previous OSS sound patch is required for this one to work properly.

This doesn't apply cleanly to the latest ALSA (1.0.1). It's no problem to do it manually, though.

Quoted 10 lines

sound/pci/intel8x0.c line 2594

Quoted 8 lines

diff -Nru a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c

sound/pci/intel8x0.c +1 -0
@@ -2591,6 +2591,7 @@
 			break;
 		}
 	}
+	card->dev = &pci->dev;

Does this need to be done for all drivers?

Yes. I just did it for one driver to test it out, and show how to do it properly for others. I figured after this patch went into the kernel tree, we could fix the other drivers up.

thanks,

greg k-h

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#17 lore raw

Re: [PATCH] add sysfs class support for ALSA sound devices [08/10]

Quoted 20 lines · Greg KH
Quoted 8 lines · Måns Rullgård
Quoted 2 lines · Greg KH

This patch adds support for all ALSA sound devices. The previous OSS sound patch is required for this one to work properly.

This doesn't apply cleanly to the latest ALSA (1.0.1). It's no problem to do it manually, though.

Quoted 10 lines

sound/pci/intel8x0.c line 2594

Quoted 8 lines

diff -Nru a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c

sound/pci/intel8x0.c +1 -0
@@ -2591,6 +2591,7 @@
 			break;
 		}
 	}
+	card->dev = &pci->dev;

Does this need to be done for all drivers?

Quoted 3 lines

Yes. I just did it for one driver to test it out, and show how to do it properly for others. I figured after this patch went into the kernel tree, we could fix the other drivers up.

Well, it seems to work with my intel8x0 and ALSA 1.0.1.

Signature · 2 lines
Måns Rullgård
[email protected]
#18 lore raw

Re: [PATCH] add sysfs class support for OSS sound devices [07/10]

In reply to Greg KH
Quoted 1 line · Greg KH

This patch adds support for all OSS sound devices.

Please excuse my ignorance, but shouldn't these patches be sent to alsa? I mean unless they are in their cvs, updateing alsa drivers will become a hard task.

Prakash

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#19 lore raw

Re: [PATCH] add sysfs class support for OSS sound devices [07/10]

Quoted 4 lines · Prakash K. Cheemplavam
Quoted 1 line · Greg KH

This patch adds support for all OSS sound devices.

Please excuse my ignorance, but shouldn't these patches be sent to alsa?

Heh, you want me to send the OSS patch to the ALSA group?

Quoted 2 lines

I mean unless they are in their cvs, updateing alsa drivers will become a hard task.

They can handle merging these patches properly, and have told me this in the past. As the ALSA patches require the class_simple patch, it wouldn't do me any good to send it to them yet, as it wouldn't even build for them.

In short, don't worry about it :)

thanks,

greg k-h

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#20 lore raw

Re: [PATCH] add sysfs class support for OSS sound devices [07/10]

Quoted 10 lines · Greg KH
Quoted 5 lines · Prakash K. Cheemplavam
Quoted 1 line · Greg KH

This patch adds support for all OSS sound devices.

Please excuse my ignorance, but shouldn't these patches be sent to alsa?

Heh, you want me to send the OSS patch to the ALSA group?

I just replied to the wrong patch, but OSS emu also belongs to alsa, isn't it. :-)

Quoted 1 line

In short, don't worry about it :)

OK. :-)

Prakash

#21 lore raw

Re: [PATCH] add class_simple support [01/10]

In reply to Greg KH

In message <[email protected]> you write:

drivers/base/class_simple.c line 187

Quoted 2 lines
drivers/base/class_simple.c new file +2 -0
+	list_for_each(tmp, &simple_dev_list) {
+		s_dev = list_entry(tmp, struct simple_dev, node);

Hi again Greg.

Insert a gentle reminder about list_for_each_entry here.

Cheers,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#22 lore raw
In reply to Greg KH
Quoted 6 lines · Greg KH

Hi,

Here are 10 different patches, all against a clean 2.6.1. They update my previous sysfs class patches (and those should be dropped from the existing -mm tree). They fix the race condition in the previous ones, and add new support for raw and lp devices.

Are these downloadable from some place? Or even better, BK pullable?

Signature · 14 lines
Måns Rullgård
[email protected]



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
author
#23 lore raw
Quoted 10 lines · Måns Rullgård
Quoted 6 lines · Greg KH

Hi,

Here are 10 different patches, all against a clean 2.6.1. They update my previous sysfs class patches (and those should be dropped from the existing -mm tree). They fix the race condition in the previous ones, and add new support for raw and lp devices.

Are these downloadable from some place? Or even better, BK pullable?

They are all located at:

	kernel.org/pub/linux/kernel/people/gregkh/misc/2.6/sysfs-*-2.6.1.patch

I also have them in my own bk tree at:

	bk://kernel.bkbits.net:/home/gregkh/linux/gregkh-2.6

but that tree is NOT parented off of Linus's bk tree, so odds are you can not pull from it. You can clone it if you really want to...

thanks,

greg k-h

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel