source: GPL/trunk/include/linux/sysfs.h@ 679

Last change on this file since 679 was 679, checked in by David Azarewicz, 4 years ago

Merge changes from Paul's uniaud32next branch.

File size: 800 bytes
Line 
1#ifndef _LINUX_SYSFS_H
2#define _LINUX_SYSFS_H
3#include <linux/types.h>
4
5struct attribute {
6 const char *name;
7 umode_t mode;
8};
9
10struct attribute_group {
11 const char *name;
12 umode_t (*is_visible)(struct kobject *,
13 struct attribute *, int);
14 struct attribute **attrs;
15 struct bin_attribute **bin_attrs;
16};
17
18#define __ATTR_RO(_name) { \
19 .attr = { .name = __stringify(_name), .mode = S_IRUGO }, \
20 .show = _name##_show, \
21}
22
23static inline int sysfs_create_groups(struct kobject *kobj,
24 const struct attribute_group **groups)
25{
26 return 0;
27}
28
29struct sysfs_ops {
30 ssize_t (*show)(struct kobject *, struct attribute *,char *);
31 ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
32};
33
34#endif /* _LINUX_SYSFS_H */
Note: See TracBrowser for help on using the repository browser.