Driver core update for 4.1-rc1
Here's the driver-core / kobject / lz4 tree update for 4.1-rc1. Everything here has been in linux-next for a while with no reported issues. It's mostly just coding style cleanups, with other minor changes in here as well, nothing big. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlUsHkwACgkQMUfUDdst+ykT2gCfbYRyqG+p+jPJnaintZABv04D atMAn0TFWeyRzlYu/eHpKVnrASUYKxA9 =GwEv -----END PGP SIGNATURE----- Merge tag 'driver-core-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here's the driver-core / kobject / lz4 tree update for 4.1-rc1. Everything here has been in linux-next for a while with no reported issues. It's mostly just coding style cleanups, with other minor changes in here as well, nothing big" * tag 'driver-core-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (32 commits) debugfs: allow bad parent pointers to be passed in stable_kernel_rules: Add clause about specification of kernel versions to patch. kobject: WARN as tip when call kobject_get() to a kobject not initialized lib/lz4: Pull out constant tables drivers: platform: parse IRQ flags from resources driver core: Make probe deferral more quiet drivers/core/of: Add symlink to device-tree from devices with an OF node device: Add dev_of_node() accessor drivers: base: fw: fix ret value when loading fw firmware: Avoid manual device_create_file() calls drivers/base: cacheinfo: validate device node for all the caches drivers/base: use tabs where possible in code indentation driver core: add missing blank line after declaration drivers: base: node: Delete space after pointer declaration drivers: base: memory: Use tabs instead of spaces firmware_class: Fix whitespace and indentation drivers: base: dma-mapping: Erase blank space after pointer drivers: base: class: Add a blank line after declarations attribute_container: fix missing blank lines after declarations drivers: base: memory: Fix switch indent ...
This commit is contained in:
commit
c4be50eee2
25 changed files with 218 additions and 111 deletions
|
|
@ -916,6 +916,13 @@ static inline void device_lock_assert(struct device *dev)
|
|||
lockdep_assert_held(&dev->mutex);
|
||||
}
|
||||
|
||||
static inline struct device_node *dev_of_node(struct device *dev)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_OF))
|
||||
return NULL;
|
||||
return dev->of_node;
|
||||
}
|
||||
|
||||
void driver_init(void);
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -57,6 +57,21 @@ do { \
|
|||
#define sysfs_attr_init(attr) do {} while (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct attribute_group - data structure used to declare an attribute group.
|
||||
* @name: Optional: Attribute group name
|
||||
* If specified, the attribute group will be created in
|
||||
* a new subdirectory with this name.
|
||||
* @is_visible: Optional: Function to return permissions associated with an
|
||||
* attribute of the group. Will be called repeatedly for each
|
||||
* attribute in the group. Only read/write permissions as well as
|
||||
* SYSFS_PREALLOC are accepted. Must return 0 if an attribute is
|
||||
* not visible. The returned value will replace static permissions
|
||||
* defined in struct attribute or struct bin_attribute.
|
||||
* @attrs: Pointer to NULL terminated list of attributes.
|
||||
* @bin_attrs: Pointer to NULL terminated list of binary attributes.
|
||||
* Either attrs or bin_attrs or both must be provided.
|
||||
*/
|
||||
struct attribute_group {
|
||||
const char *name;
|
||||
umode_t (*is_visible)(struct kobject *,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue