mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-08 14:23:19 +00:00
Documentation: driver core: remove use of BUS_ATTR
We are getting rid of the "raw" BUS_ATTR() macro, so fix up the documentation to not refer to it anymore. Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
de96e9fea7
commit
735df0ff6e
@ -124,11 +124,11 @@ struct bus_attribute {
|
|||||||
ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
|
ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
|
||||||
};
|
};
|
||||||
|
|
||||||
Bus drivers can export attributes using the BUS_ATTR macro that works
|
Bus drivers can export attributes using the BUS_ATTR_RW macro that works
|
||||||
similarly to the DEVICE_ATTR macro for devices. For example, a definition
|
similarly to the DEVICE_ATTR_RW macro for devices. For example, a
|
||||||
like this:
|
definition like this:
|
||||||
|
|
||||||
static BUS_ATTR(debug,0644,show_debug,store_debug);
|
static BUS_ATTR_RW(debug);
|
||||||
|
|
||||||
is equivalent to declaring:
|
is equivalent to declaring:
|
||||||
|
|
||||||
|
@ -344,7 +344,9 @@ struct bus_attribute {
|
|||||||
|
|
||||||
Declaring:
|
Declaring:
|
||||||
|
|
||||||
BUS_ATTR(_name, _mode, _show, _store)
|
static BUS_ATTR_RW(name);
|
||||||
|
static BUS_ATTR_RO(name);
|
||||||
|
static BUS_ATTR_WO(name);
|
||||||
|
|
||||||
Creation/Removal:
|
Creation/Removal:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user