Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
rio-sysfs.c File Reference
#include <linux/kernel.h>
#include <linux/rio.h>
#include <linux/rio_drv.h>
#include <linux/stat.h>
#include <linux/capability.h>
#include "rio.h"

Go to the source code of this file.

Macros

#define rio_config_attr(field, format_string)
 

Functions

 rio_config_attr (did,"0x%04x\n")
 
 rio_config_attr (vid,"0x%04x\n")
 
 rio_config_attr (device_rev,"0x%08x\n")
 
 rio_config_attr (asm_did,"0x%04x\n")
 
 rio_config_attr (asm_vid,"0x%04x\n")
 
 rio_config_attr (asm_rev,"0x%04x\n")
 
 rio_config_attr (destid,"0x%04x\n")
 
 rio_config_attr (hopcount,"0x%02x\n")
 
int rio_create_sysfs_dev_files (struct rio_dev *rdev)
 
void rio_remove_sysfs_dev_files (struct rio_dev *rdev)
 

Variables

struct device_attribute rio_dev_attrs []
 

Macro Definition Documentation

#define rio_config_attr (   field,
  format_string 
)
Value:
static ssize_t \
field##_show(struct device *dev, struct device_attribute *attr, char *buf) \
{ \
\
return sprintf(buf, format_string, rdev->field); \
} \

Definition at line 22 of file rio-sysfs.c.

Function Documentation

rio_config_attr ( did  ,
"0x%04x\n"   
)
rio_config_attr ( vid  ,
"0x%04x\n"   
)
rio_config_attr ( device_rev  ,
"0x%08x\n"   
)
rio_config_attr ( asm_did  ,
"0x%04x\n"   
)
rio_config_attr ( asm_vid  ,
"0x%04x\n"   
)
rio_config_attr ( asm_rev  ,
"0x%04x\n"   
)
rio_config_attr ( destid  ,
"0x%04x\n"   
)
rio_config_attr ( hopcount  ,
"0x%02x\n"   
)
int rio_create_sysfs_dev_files ( struct rio_dev rdev)

rio_create_sysfs_dev_files - create RIO specific sysfs files : device whose entries should be created

Create files when is added to sysfs.

Definition at line 250 of file rio-sysfs.c.

void rio_remove_sysfs_dev_files ( struct rio_dev rdev)

rio_remove_sysfs_dev_files - cleanup RIO specific sysfs files : device whose entries we should free

Cleanup when is removed from sysfs.

Definition at line 277 of file rio-sysfs.c.

Variable Documentation

struct device_attribute rio_dev_attrs[]
Initial value:
= {
__ATTR_RO(did),
__ATTR_RO(device_rev),
__ATTR_RO(asm_did),
__ATTR_RO(asm_vid),
__ATTR_RO(asm_rev),
__ATTR_RO(lprev),
__ATTR_RO(destid),
}

Definition at line 87 of file rio-sysfs.c.