mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
Merge branch 'bind_unbind' into driver-core-next
This merges the bind_unbind driver core feature into the driver-core-next branch. bind_unbind is a branch so that others can pull and work off of it safely. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
commit
1af824f085
9 changed files with 176 additions and 44 deletions
|
@ -1200,6 +1200,36 @@ struct device *device_create_with_groups(struct class *cls,
|
|||
const char *fmt, ...);
|
||||
extern void device_destroy(struct class *cls, dev_t devt);
|
||||
|
||||
extern int __must_check device_add_groups(struct device *dev,
|
||||
const struct attribute_group **groups);
|
||||
extern void device_remove_groups(struct device *dev,
|
||||
const struct attribute_group **groups);
|
||||
|
||||
static inline int __must_check device_add_group(struct device *dev,
|
||||
const struct attribute_group *grp)
|
||||
{
|
||||
const struct attribute_group *groups[] = { grp, NULL };
|
||||
|
||||
return device_add_groups(dev, groups);
|
||||
}
|
||||
|
||||
static inline void device_remove_group(struct device *dev,
|
||||
const struct attribute_group *grp)
|
||||
{
|
||||
const struct attribute_group *groups[] = { grp, NULL };
|
||||
|
||||
return device_remove_groups(dev, groups);
|
||||
}
|
||||
|
||||
extern int __must_check devm_device_add_groups(struct device *dev,
|
||||
const struct attribute_group **groups);
|
||||
extern void devm_device_remove_groups(struct device *dev,
|
||||
const struct attribute_group **groups);
|
||||
extern int __must_check devm_device_add_group(struct device *dev,
|
||||
const struct attribute_group *grp);
|
||||
extern void devm_device_remove_group(struct device *dev,
|
||||
const struct attribute_group *grp);
|
||||
|
||||
/*
|
||||
* Platform "fixup" functions - allow the platform to have their say
|
||||
* about devices and actions that the general device layer doesn't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue