Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
hwmon.c File Reference
#include <linux/module.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/kdev_t.h>
#include <linux/idr.h>
#include <linux/hwmon.h>
#include <linux/gfp.h>
#include <linux/spinlock.h>
#include <linux/pci.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define HWMON_ID_PREFIX   "hwmon"
 
#define HWMON_ID_FORMAT   HWMON_ID_PREFIX "%d"
 

Functions

struct devicehwmon_device_register (struct device *dev)
 
 EXPORT_SYMBOL_GPL (hwmon_device_register)
 
void hwmon_device_unregister (struct device *dev)
 
 EXPORT_SYMBOL_GPL (hwmon_device_unregister)
 
 subsys_initcall (hwmon_init)
 
 module_exit (hwmon_exit)
 
 MODULE_AUTHOR ("Mark M. Hoffman <[email protected]>")
 
 MODULE_DESCRIPTION ("hardware monitoring sysfs/class support")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define HWMON_ID_FORMAT   HWMON_ID_PREFIX "%d"

Definition at line 26 of file hwmon.c.

#define HWMON_ID_PREFIX   "hwmon"

Definition at line 25 of file hwmon.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 13 of file hwmon.c.

Function Documentation

EXPORT_SYMBOL_GPL ( hwmon_device_register  )
EXPORT_SYMBOL_GPL ( hwmon_device_unregister  )
struct device* hwmon_device_register ( struct device dev)
read

hwmon_device_register - register w/ hwmon : the device to register

hwmon_device_unregister() must be called when the device is no longer needed.

Returns the pointer to the new device.

Definition at line 41 of file hwmon.c.

void hwmon_device_unregister ( struct device dev)

hwmon_device_unregister - removes the previously registered class device

: the class device to destroy

Definition at line 65 of file hwmon.c.

MODULE_AUTHOR ( "Mark M. Hoffman <[email protected]>"  )
MODULE_DESCRIPTION ( "hardware monitoring sysfs/class support )
module_exit ( hwmon_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( hwmon_init  )