Commit Graph
6 Commits
Author SHA1 Message Date
Greg Kroah-Hartman 07afb6ace3 samples/kobject: be explicit in the module license
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-25 13:41:42 +01:00
Rastislav Barlik 5fd637e7a7 samples/kobject: Use kstrtoint instead of sscanf
Use kstrtoint function instead of sscanf and check for return values.

Signed-off-by: Rastislav Barlik <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-25 13:40:31 +01:00
Rusty Russell de5109898a samples/kobject/: avoid world-writable sysfs files.
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 <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
2014-05-14 10:53:57 +09:30
Radu Voicilas a115bc070b kobject-example: Spelling fixes.
No change in functionality.

Signed-off-by: Radu Voicilas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07 17:04:46 -08:00
Qinghuang Feng 7ec7fb3942 samples: mark {static|__init|__exit} for {init|exit} functions
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 <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-01-06 15:59:12 -08:00
Greg Kroah-Hartman 40efcb05f2 kobject: add sample code for how to use kobjects in a simple manner.
This is a simple kobject module, showing how to use kobj_attributes in
basic and more complex ways.

Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2008-01-24 20:40:41 -08:00