blob: fb15c4c0a7e05fa015c44164996457d519eb66bb [file] [log] [blame]
From foo@baz Wed Jul 10 11:59:39 PDT 2013
Date: Wed, 10 Jul 2013 11:59:39 -0700
To: Greg KH <gregkh@linuxfoundation.org>
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: driver core: remove bin_attrs from struct device
No one is using the bin_attrs field in struct device, and now that you
can add them properly through an attribute group, it isn't needed
either, so remove it.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/base/core.c | 7 -------
include/linux/device.h | 2 --
2 files changed, 9 deletions(-)
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -491,14 +491,8 @@ static int device_add_attrs(struct devic
goto err_remove_type_groups;
}
- error = device_add_bin_attributes(dev, dev->bin_attrs);
- if (error)
- goto err_remove_groups;
return 0;
- err_remove_groups:
- device_remove_groups(dev, dev->groups);
-
err_remove_type_groups:
if (type)
device_remove_groups(dev, type->groups);
@@ -516,7 +510,6 @@ static void device_remove_attrs(struct d
device_remove_file(dev, &online_attr);
device_remove_groups(dev, dev->groups);
- device_remove_bin_attributes(dev, dev->bin_attrs);
if (type)
device_remove_groups(dev, type->groups);
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -656,7 +656,6 @@ struct acpi_dev_node {
* @knode_class: The node used to add the device to the class list.
* @class: The class of the device.
* @groups: Optional attribute groups.
- * @bin_attrs: Optional binary attributes for this device.
* @release: Callback to free the device after all references have
* gone away. This should be set by the allocator of the
* device (i.e. the bus driver that discovered the device).
@@ -733,7 +732,6 @@ struct device {
struct klist_node knode_class;
struct class *class;
const struct attribute_group **groups; /* optional groups */
- const struct bin_attribute *bin_attrs;
void (*release)(struct device *dev);
struct iommu_group *iommu_group;