Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
dma-sysfs.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/stat.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/string.h>
#include <asm/dma.h>

Go to the source code of this file.

Macros

#define dma_ro_attr(field, fmt)
 

Functions

 postcore_initcall (dma_subsys_init)
 
 dma_ro_attr (count,"0x%08x\n")
 
 dma_ro_attr (flags,"0x%08lx\n")
 
int dma_create_sysfs_files (struct dma_channel *chan, struct dma_info *info)
 
void dma_remove_sysfs_files (struct dma_channel *chan, struct dma_info *info)
 

Macro Definition Documentation

#define dma_ro_attr (   field,
  fmt 
)
Value:
static ssize_t dma_show_##field(struct device *dev, \
struct device_attribute *attr, char *buf)\
{ \
struct dma_channel *channel = to_dma_channel(dev); \
return sprintf(buf, fmt, channel->field); \
} \
static DEVICE_ATTR(field, S_IRUGO, dma_show_##field, NULL);

Definition at line 112 of file dma-sysfs.c.

Function Documentation

int dma_create_sysfs_files ( struct dma_channel chan,
struct dma_info info 
)

Definition at line 124 of file dma-sysfs.c.

void dma_remove_sysfs_files ( struct dma_channel chan,
struct dma_info info 
)

Definition at line 152 of file dma-sysfs.c.

dma_ro_attr ( count  ,
"0x%08x\n"   
)
dma_ro_attr ( flags  ,
"0x%08lx\n"   
)
postcore_initcall ( dma_subsys_init  )