Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
kset-example.c File Reference
#include <linux/kobject.h>
#include <linux/string.h>
#include <linux/sysfs.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/init.h>

Go to the source code of this file.

Data Structures

struct  foo_obj
 
struct  foo_attribute
 

Macros

#define to_foo_obj(x)   container_of(x, struct foo_obj, kobj)
 
#define to_foo_attr(x)   container_of(x, struct foo_attribute, attr)
 

Functions

 module_init (example_init)
 
 module_exit (example_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Greg Kroah-Hartman <[email protected]>")
 

Macro Definition Documentation

#define to_foo_attr (   x)    container_of(x, struct foo_attribute, attr)

Definition at line 45 of file kset-example.c.

#define to_foo_obj (   x)    container_of(x, struct foo_obj, kobj)

Definition at line 37 of file kset-example.c.

Function Documentation

MODULE_AUTHOR ( "Greg Kroah-Hartman <[email protected]>"  )
module_exit ( example_exit  )
module_init ( example_init  )
MODULE_LICENSE ( "GPL"  )