Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
8d1290b8
Commit
8d1290b8
authored
Jul 31, 2002
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
driverfs: Declare DEVICE_ATTR macro for initializing device attributes
(hide internal format of the structure)
parent
9c817b39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
include/linux/driverfs_fs.h
include/linux/driverfs_fs.h
+8
-1
No files found.
include/linux/driverfs_fs.h
View file @
8d1290b8
...
@@ -37,11 +37,18 @@ struct device;
...
@@ -37,11 +37,18 @@ struct device;
struct
device_attribute
{
struct
device_attribute
{
char
*
name
;
char
*
name
;
mode_t
mode
;
mode_t
mode
;
ssize_t
(
*
show
)(
struct
device
*
dev
,
char
*
buf
,
size_t
count
,
loff_t
off
);
ssize_t
(
*
show
)(
struct
device
*
dev
,
char
*
buf
,
size_t
count
,
loff_t
off
);
ssize_t
(
*
store
)(
struct
device
*
dev
,
const
char
*
buf
,
size_t
count
,
loff_t
off
);
ssize_t
(
*
store
)(
struct
device
*
dev
,
const
char
*
buf
,
size_t
count
,
loff_t
off
);
};
};
#define DEVICE_ATTR(_name,_str,_mode,_show,_store) \
struct device_attribute dev_attr_##_name = { \
.name = _str, \
.mode = _mode, \
.show = _show, \
.store = _store, \
};
extern
int
extern
int
driverfs_create_dir
(
struct
driver_dir_entry
*
,
struct
driver_dir_entry
*
);
driverfs_create_dir
(
struct
driver_dir_entry
*
,
struct
driver_dir_entry
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment