summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 10cf209a4e82..7698a513b35e 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1205,6 +1205,22 @@ extern int __must_check device_add_groups(struct device *dev,
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);
+}
+
/*
* Platform "fixup" functions - allow the platform to have their say
* about devices and actions that the general device layer doesn't
OpenPOWER on IntegriCloud