Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/kobject.h>
#include <linux/kallsyms.h>
#include <linux/slab.h>
#include <linux/fsnotify.h>
#include <linux/namei.h>
#include <linux/poll.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/limits.h>
#include <asm/uaccess.h>
#include "sysfs.h"
Go to the source code of this file.
Data Structures | |
struct | sysfs_open_dirent |
struct | sysfs_buffer |
struct | sysfs_schedule_callback_struct |
Variables | |
struct file_operations | sysfs_file_operations |
EXPORT_SYMBOL_GPL | ( | sysfs_notify_dirent | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_notify | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_add_file_to_group | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_chmod_file | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_remove_file_from_group | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_schedule_callback | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_create_file | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_remove_file | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_remove_files | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_create_files | ) |
void sysfs_notify_dirent | ( | struct sysfs_dirent * | sd | ) |
int sysfs_schedule_callback | ( | struct kobject * | kobj, |
void(*)(void *) | func, | ||
void * | data, | ||
struct module * | owner | ||
) |
sysfs_schedule_callback - helper to schedule a callback for a kobject : object we're acting for. : callback function to invoke later. : argument to pass to . : module owning the callback code
sysfs attribute methods must not unregister themselves or their parent kobject (which would amount to the same thing). Attempts to do so will deadlock, since unregistration is mutually exclusive with driver callbacks.
Instead methods can call this routine, which will attempt to allocate and schedule a workqueue request to call back with as its argument in the workqueue's process context. will be pinned until returns.
Returns 0 if the request was submitted, -ENOMEM if storage could not be allocated, -ENODEV if a reference to isn't available, -EAGAIN if a callback has already been scheduled for .
struct file_operations sysfs_file_operations |