aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-08 18:22:55 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:05:56 -0400
commit4ee122a685ab37955aa57bf1b58a49930398fd36 (patch)
tree5494c84f5e5e4c99b8878613326ae773255b257d /drivers/base/core.c
parentbbfb188d6642386424860f9180d24a4acd75ab97 (diff)
driver core: bus_type: add dev_groups
attribute groups are much more flexible than just a list of attributes, due to their support for visibility of the attributes, and binary attributes. Add dev_groups to struct bus_type which should be used instead of dev_attrs. dev_attrs will be removed from the structure soon. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index ca4bcb8b3938..e4bdf535fb27 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -461,8 +461,7 @@ static void device_remove_bin_attributes(struct device *dev,
461 device_remove_bin_file(dev, &attrs[i]); 461 device_remove_bin_file(dev, &attrs[i]);
462} 462}
463 463
464static int device_add_groups(struct device *dev, 464int device_add_groups(struct device *dev, const struct attribute_group **groups)
465 const struct attribute_group **groups)
466{ 465{
467 int error = 0; 466 int error = 0;
468 int i; 467 int i;
@@ -481,8 +480,8 @@ static int device_add_groups(struct device *dev,
481 return error; 480 return error;
482} 481}
483 482
484static void device_remove_groups(struct device *dev, 483void device_remove_groups(struct device *dev,
485 const struct attribute_group **groups) 484 const struct attribute_group **groups)
486{ 485{
487 int i; 486 int i;
488 487