add "simple" class device support [1/5]
PATCH 1/1 add "simple" class device support [1/5]
Adds a "simple" class device interface to the kernel for char devices that don't want to roll their own struct class_device handling logic.
drivers/base/Makefile +1 -1
@@ -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_simple.c new file +123 -0
123 lines not on this page · raw message
include/linux/device.h +5 -0
@@ -246,6 +246,11 @@extern int class_interface_register (struct class_interface *);extern void class_interface_unregister (struct class_interface *); +/* interface for simple class devices */ +extern struct class_device *simple_add_class_device (struct class *class,dev_t dev,struct device *device,const char *fmt, ...) + __attribute__((format (printf,4 ,5 ))); +extern void simple_remove_class_device (dev_t dev); +struct device {struct list_head node;/* node in sibling list */
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel