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
nexedi
linux
Commits
67eeb0b5
Commit
67eeb0b5
authored
Jan 12, 2003
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sysfs: reinstate count parameter for sysfs_ops.store() methods.
- Fixup bus, driver, and class methods.
parent
ef43a6db
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
drivers/base/bus.c
drivers/base/bus.c
+6
-4
drivers/base/class.c
drivers/base/class.c
+3
-2
include/linux/device.h
include/linux/device.h
+3
-3
No files found.
drivers/base/bus.c
View file @
67eeb0b5
...
...
@@ -43,14 +43,15 @@ drv_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
}
static
ssize_t
drv_attr_store
(
struct
kobject
*
kobj
,
struct
attribute
*
attr
,
const
char
*
buf
)
drv_attr_store
(
struct
kobject
*
kobj
,
struct
attribute
*
attr
,
const
char
*
buf
,
size_t
count
)
{
struct
driver_attribute
*
drv_attr
=
to_drv_attr
(
attr
);
struct
device_driver
*
drv
=
to_driver
(
kobj
);
ssize_t
ret
=
0
;
if
(
drv_attr
->
store
)
ret
=
drv_attr
->
store
(
drv
,
buf
);
ret
=
drv_attr
->
store
(
drv
,
buf
,
count
);
return
ret
;
}
...
...
@@ -90,14 +91,15 @@ bus_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
}
static
ssize_t
bus_attr_store
(
struct
kobject
*
kobj
,
struct
attribute
*
attr
,
const
char
*
buf
)
bus_attr_store
(
struct
kobject
*
kobj
,
struct
attribute
*
attr
,
const
char
*
buf
,
size_t
count
)
{
struct
bus_attribute
*
bus_attr
=
to_bus_attr
(
attr
);
struct
bus_type
*
bus
=
to_bus
(
kobj
);
ssize_t
ret
=
0
;
if
(
bus_attr
->
store
)
ret
=
bus_attr
->
store
(
bus
,
buf
);
ret
=
bus_attr
->
store
(
bus
,
buf
,
count
);
return
ret
;
}
...
...
drivers/base/class.c
View file @
67eeb0b5
...
...
@@ -26,14 +26,15 @@ devclass_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
}
static
ssize_t
devclass_attr_store
(
struct
kobject
*
kobj
,
struct
attribute
*
attr
,
const
char
*
buf
)
devclass_attr_store
(
struct
kobject
*
kobj
,
struct
attribute
*
attr
,
const
char
*
buf
,
size_t
count
)
{
struct
devclass_attribute
*
class_attr
=
to_class_attr
(
attr
);
struct
device_class
*
dc
=
to_class
(
kobj
);
ssize_t
ret
=
0
;
if
(
class_attr
->
store
)
ret
=
class_attr
->
store
(
dc
,
buf
);
ret
=
class_attr
->
store
(
dc
,
buf
,
count
);
return
ret
;
}
...
...
include/linux/device.h
View file @
67eeb0b5
...
...
@@ -98,7 +98,7 @@ int bus_for_each_drv(struct bus_type * bus, struct device_driver * start,
struct
bus_attribute
{
struct
attribute
attr
;
ssize_t
(
*
show
)(
struct
bus_type
*
,
char
*
buf
);
ssize_t
(
*
store
)(
struct
bus_type
*
,
const
char
*
buf
);
ssize_t
(
*
store
)(
struct
bus_type
*
,
const
char
*
buf
,
size_t
count
);
};
#define BUS_ATTR(_name,_mode,_show,_store) \
...
...
@@ -141,7 +141,7 @@ extern void put_driver(struct device_driver * drv);
struct
driver_attribute
{
struct
attribute
attr
;
ssize_t
(
*
show
)(
struct
device_driver
*
,
char
*
buf
);
ssize_t
(
*
store
)(
struct
device_driver
*
,
const
char
*
buf
);
ssize_t
(
*
store
)(
struct
device_driver
*
,
const
char
*
buf
,
size_t
count
);
};
#define DRIVER_ATTR(_name,_mode,_show,_store) \
...
...
@@ -182,7 +182,7 @@ extern void put_devclass(struct device_class *);
struct
devclass_attribute
{
struct
attribute
attr
;
ssize_t
(
*
show
)(
struct
device_class
*
,
char
*
buf
);
ssize_t
(
*
store
)(
struct
device_class
*
,
const
char
*
buf
);
ssize_t
(
*
store
)(
struct
device_class
*
,
const
char
*
buf
,
size_t
count
);
};
#define DEVCLASS_ATTR(_name,_str,_mode,_show,_store) \
...
...
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