summaryrefslogtreecommitdiffstats
path: root/samples/kobject/kobject-example.c
Commit message (Collapse)AuthorAgeFilesLines
* samples/kobject: be explicit in the module licenseGreg Kroah-Hartman2015-03-251-1/+1
| | | | | | | | Rusty pointed out that the module license should be "GPL v2" to properly match the notice at the top of the files, so make that change. Reported-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* samples/kobject: Use kstrtoint instead of sscanfRastislav Barlik2015-03-251-3/+11
| | | | | | | Use kstrtoint function instead of sscanf and check for return values. Signed-off-by: Rastislav Barlik <barlik@zoho.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* samples/kobject/: avoid world-writable sysfs files.Rusty Russell2014-05-141-3/+4
| | | | | | | | In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Greg Kroah-Hartman <greg@kroah.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* kobject-example: Spelling fixes.Radu Voicilas2010-03-071-2/+2
| | | | | | | | No change in functionality. Signed-off-by: Radu Voicilas <rvoicilas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* samples: mark {static|__init|__exit} for {init|exit} functionsQinghuang Feng2009-01-061-2/+2
| | | | | | | | | | | | None of these (init|exit) functions is called from other functions which is outside the kernel module mechanism or kernel itself, so mark them as {static|__init|__exit}. Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* kobject: add sample code for how to use kobjects in a simple manner.Greg Kroah-Hartman2008-01-241-0/+137
This is a simple kobject module, showing how to use kobj_attributes in basic and more complex ways. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>