aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-04 13:29:35 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-04 13:29:35 -0700
commitf2a4447ad2255b39ebc3de81bf020ea667fdf983 (patch)
treedce9b269f2f42fb2823192ab51c24aa89cab6502
parent51347e968c062c4041dd5317122ab573f06b889b (diff)
downloadpatches-f2a4447ad2255b39ebc3de81bf020ea667fdf983.tar.gz
refresh patches to work against Linus's tree now
-rw-r--r--driver-core-remove-dev_attrs-from-struct-class.patch20
-rw-r--r--driver-core-remove-dev_bin_attrs-from-struct-class.patch22
-rw-r--r--driver-core-remove-struct-bus_type.bus_attrs.patch12
-rw-r--r--driver-core-remove-struct-bus_type.dev_attrs.patch12
-rw-r--r--driver-core-remove-struct-bus_type.drv_attrs.patch10
5 files changed, 38 insertions, 38 deletions
diff --git a/driver-core-remove-dev_attrs-from-struct-class.patch b/driver-core-remove-dev_attrs-from-struct-class.patch
index 9a6ab2a13b9822..c187a47e80858f 100644
--- a/driver-core-remove-dev_attrs-from-struct-class.patch
+++ b/driver-core-remove-dev_attrs-from-struct-class.patch
@@ -15,9 +15,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
-@@ -433,35 +433,6 @@ static ssize_t store_online(struct devic
- static struct device_attribute online_attr =
- __ATTR(online, S_IRUGO | S_IWUSR, show_online, store_online);
+@@ -455,35 +455,6 @@ static ssize_t online_store(struct devic
+ }
+ static DEVICE_ATTR_RW(online);
-static int device_add_attributes(struct device *dev,
- struct device_attribute *attrs)
@@ -26,7 +26,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- int i;
-
- if (attrs) {
-- for (i = 0; attr_name(attrs[i]); i++) {
+- for (i = 0; attrs[i].attr.name; i++) {
- error = device_create_file(dev, &attrs[i]);
- if (error)
- break;
@@ -44,14 +44,14 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- int i;
-
- if (attrs)
-- for (i = 0; attr_name(attrs[i]); i++)
+- for (i = 0; attrs[i].attr.name; i++)
- device_remove_file(dev, &attrs[i]);
-}
-
static int device_add_bin_attributes(struct device *dev,
struct bin_attribute *attrs)
{
-@@ -512,12 +483,9 @@ static int device_add_attrs(struct devic
+@@ -534,12 +505,9 @@ static int device_add_attrs(struct devic
error = device_add_groups(dev, class->dev_groups);
if (error)
return error;
@@ -65,7 +65,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
}
if (type) {
-@@ -544,9 +512,6 @@ static int device_add_attrs(struct devic
+@@ -566,9 +534,6 @@ static int device_add_attrs(struct devic
err_remove_class_bin_attrs:
if (class)
device_remove_bin_attributes(dev, class->dev_bin_attrs);
@@ -75,7 +75,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
err_remove_class_groups:
if (class)
device_remove_groups(dev, class->dev_groups);
-@@ -566,7 +531,6 @@ static void device_remove_attrs(struct d
+@@ -588,7 +553,6 @@ static void device_remove_attrs(struct d
device_remove_groups(dev, type->groups);
if (class) {
@@ -85,7 +85,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
}
--- a/include/linux/device.h
+++ b/include/linux/device.h
-@@ -327,7 +327,6 @@ int subsys_virtual_register(struct bus_t
+@@ -329,7 +329,6 @@ int subsys_virtual_register(struct bus_t
* @owner: The module owner.
* @class_attrs: Default attributes of this class.
* @dev_groups: Default attributes of the devices that belong to the class.
@@ -93,7 +93,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* @dev_bin_attrs: Default binary attributes of the devices belong to the class.
* @dev_kobj: The kobject that represents this class and links it into the hierarchy.
* @dev_uevent: Called when a device is added, removed from this class, or a
-@@ -356,7 +355,6 @@ struct class {
+@@ -358,7 +357,6 @@ struct class {
struct module *owner;
struct class_attribute *class_attrs;
diff --git a/driver-core-remove-dev_bin_attrs-from-struct-class.patch b/driver-core-remove-dev_bin_attrs-from-struct-class.patch
index 8c83832c9f1393..f93d23473aab2e 100644
--- a/driver-core-remove-dev_bin_attrs-from-struct-class.patch
+++ b/driver-core-remove-dev_bin_attrs-from-struct-class.patch
@@ -17,9 +17,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
-@@ -433,35 +433,6 @@ static ssize_t store_online(struct devic
- static struct device_attribute online_attr =
- __ATTR(online, S_IRUGO | S_IWUSR, show_online, store_online);
+@@ -455,35 +455,6 @@ static ssize_t online_store(struct devic
+ }
+ static DEVICE_ATTR_RW(online);
-static int device_add_bin_attributes(struct device *dev,
- struct bin_attribute *attrs)
@@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- int i;
-
- if (attrs) {
-- for (i = 0; attr_name(attrs[i]); i++) {
+- for (i = 0; attrs[i].attr.name; i++) {
- error = device_create_bin_file(dev, &attrs[i]);
- if (error)
- break;
@@ -46,14 +46,14 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- int i;
-
- if (attrs)
-- for (i = 0; attr_name(attrs[i]); i++)
+- for (i = 0; attrs[i].attr.name; i++)
- device_remove_bin_file(dev, &attrs[i]);
-}
-
int device_add_groups(struct device *dev, const struct attribute_group **groups)
{
return sysfs_create_groups(&dev->kobj, groups);
-@@ -483,15 +454,12 @@ static int device_add_attrs(struct devic
+@@ -505,15 +476,12 @@ static int device_add_attrs(struct devic
error = device_add_groups(dev, class->dev_groups);
if (error)
return error;
@@ -70,7 +70,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
}
error = device_add_groups(dev, dev->groups);
-@@ -509,9 +477,6 @@ static int device_add_attrs(struct devic
+@@ -531,9 +499,6 @@ static int device_add_attrs(struct devic
err_remove_type_groups:
if (type)
device_remove_groups(dev, type->groups);
@@ -80,7 +80,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
err_remove_class_groups:
if (class)
device_remove_groups(dev, class->dev_groups);
-@@ -530,10 +495,8 @@ static void device_remove_attrs(struct d
+@@ -552,10 +517,8 @@ static void device_remove_attrs(struct d
if (type)
device_remove_groups(dev, type->groups);
@@ -91,10 +91,10 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- }
}
-
+ static ssize_t dev_show(struct device *dev, struct device_attribute *attr,
--- a/include/linux/device.h
+++ b/include/linux/device.h
-@@ -327,7 +327,6 @@ int subsys_virtual_register(struct bus_t
+@@ -329,7 +329,6 @@ int subsys_virtual_register(struct bus_t
* @owner: The module owner.
* @class_attrs: Default attributes of this class.
* @dev_groups: Default attributes of the devices that belong to the class.
@@ -102,7 +102,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* @dev_kobj: The kobject that represents this class and links it into the hierarchy.
* @dev_uevent: Called when a device is added, removed from this class, or a
* few other things that generate uevents to add the environment
-@@ -356,7 +355,6 @@ struct class {
+@@ -358,7 +357,6 @@ struct class {
struct class_attribute *class_attrs;
const struct attribute_group **dev_groups;
diff --git a/driver-core-remove-struct-bus_type.bus_attrs.patch b/driver-core-remove-struct-bus_type.bus_attrs.patch
index 11b1e0c44ceb2b..e764541e2d4fc9 100644
--- a/driver-core-remove-struct-bus_type.bus_attrs.patch
+++ b/driver-core-remove-struct-bus_type.bus_attrs.patch
@@ -17,7 +17,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
-@@ -845,42 +845,6 @@ struct bus_type *find_bus(char *name)
+@@ -846,42 +846,6 @@ struct bus_type *find_bus(char *name)
}
#endif /* 0 */
@@ -33,7 +33,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- int i;
-
- if (bus->bus_attrs) {
-- for (i = 0; attr_name(bus->bus_attrs[i]); i++) {
+- for (i = 0; bus->bus_attrs[i].attr.name; i++) {
- error = bus_create_file(bus, &bus->bus_attrs[i]);
- if (error)
- goto err;
@@ -52,7 +52,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- int i;
-
- if (bus->bus_attrs) {
-- for (i = 0; attr_name(bus->bus_attrs[i]); i++)
+- for (i = 0; bus->bus_attrs[i].attr.name; i++)
- bus_remove_file(bus, &bus->bus_attrs[i]);
- }
-}
@@ -60,7 +60,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
static int bus_add_groups(struct bus_type *bus,
const struct attribute_group **groups)
{
-@@ -982,9 +946,6 @@ int bus_register(struct bus_type *bus)
+@@ -983,9 +947,6 @@ int bus_register(struct bus_type *bus)
if (retval)
goto bus_probe_files_fail;
@@ -70,7 +70,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
retval = bus_add_groups(bus, bus->bus_groups);
if (retval)
goto bus_groups_fail;
-@@ -993,8 +954,6 @@ int bus_register(struct bus_type *bus)
+@@ -994,8 +955,6 @@ int bus_register(struct bus_type *bus)
return 0;
bus_groups_fail:
@@ -79,7 +79,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
remove_probe_files(bus);
bus_probe_files_fail:
kset_unregister(bus->p->drivers_kset);
-@@ -1023,7 +982,6 @@ void bus_unregister(struct bus_type *bus
+@@ -1024,7 +983,6 @@ void bus_unregister(struct bus_type *bus
pr_debug("bus: '%s': unregistering\n", bus->name);
if (bus->dev_root)
device_unregister(bus->dev_root);
diff --git a/driver-core-remove-struct-bus_type.dev_attrs.patch b/driver-core-remove-struct-bus_type.dev_attrs.patch
index 81a0f123bdf549..24c22f7abb9624 100644
--- a/driver-core-remove-struct-bus_type.dev_attrs.patch
+++ b/driver-core-remove-struct-bus_type.dev_attrs.patch
@@ -16,7 +16,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
-@@ -452,35 +452,6 @@ int bus_for_each_drv(struct bus_type *bu
+@@ -453,35 +453,6 @@ int bus_for_each_drv(struct bus_type *bu
}
EXPORT_SYMBOL_GPL(bus_for_each_drv);
@@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- if (!bus->dev_attrs)
- return 0;
-
-- for (i = 0; attr_name(bus->dev_attrs[i]); i++) {
+- for (i = 0; bus->dev_attrs[i].attr.name; i++) {
- error = device_create_file(dev, &bus->dev_attrs[i]);
- if (error) {
- while (--i >= 0)
@@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- int i;
-
- if (bus->dev_attrs) {
-- for (i = 0; attr_name(bus->dev_attrs[i]); i++)
+- for (i = 0; bus->dev_attrs[i].attr.name; i++)
- device_remove_file(dev, &bus->dev_attrs[i]);
- }
-}
@@ -52,7 +52,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/**
* bus_add_device - add device to bus
* @dev: device being added
-@@ -496,16 +467,13 @@ int bus_add_device(struct device *dev)
+@@ -497,16 +468,13 @@ int bus_add_device(struct device *dev)
if (bus) {
pr_debug("bus: '%s': add device %s\n", bus->name, dev_name(dev));
@@ -71,7 +71,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
error = sysfs_create_link(&dev->kobj,
&dev->bus->p->subsys.kobj, "subsystem");
if (error)
-@@ -518,8 +486,6 @@ out_subsys:
+@@ -519,8 +487,6 @@ out_subsys:
sysfs_remove_link(&bus->p->devices_kset->kobj, dev_name(dev));
out_groups:
device_remove_groups(dev, bus->dev_groups);
@@ -80,7 +80,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
out_put:
bus_put(dev->bus);
return error;
-@@ -579,7 +545,6 @@ void bus_remove_device(struct device *de
+@@ -580,7 +546,6 @@ void bus_remove_device(struct device *de
sysfs_remove_link(&dev->kobj, "subsystem");
sysfs_remove_link(&dev->bus->p->devices_kset->kobj,
dev_name(dev));
diff --git a/driver-core-remove-struct-bus_type.drv_attrs.patch b/driver-core-remove-struct-bus_type.drv_attrs.patch
index 2efe0fb44276ed..f94737369f24dc 100644
--- a/driver-core-remove-struct-bus_type.drv_attrs.patch
+++ b/driver-core-remove-struct-bus_type.drv_attrs.patch
@@ -16,7 +16,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
-@@ -590,37 +590,6 @@ void bus_remove_device(struct device *de
+@@ -591,37 +591,6 @@ void bus_remove_device(struct device *de
bus_put(dev->bus);
}
@@ -26,7 +26,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- int i;
-
- if (bus->drv_attrs) {
-- for (i = 0; attr_name(bus->drv_attrs[i]); i++) {
+- for (i = 0; bus->drv_attrs[i].attr.name; i++) {
- error = driver_create_file(drv, &bus->drv_attrs[i]);
- if (error)
- goto err;
@@ -46,7 +46,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- int i;
-
- if (bus->drv_attrs) {
-- for (i = 0; attr_name(bus->drv_attrs[i]); i++)
+- for (i = 0; bus->drv_attrs[i].attr.name; i++)
- driver_remove_file(drv, &bus->drv_attrs[i]);
- }
-}
@@ -54,7 +54,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
static int __must_check add_bind_files(struct device_driver *drv)
{
int ret;
-@@ -719,16 +688,12 @@ int bus_add_driver(struct device_driver
+@@ -720,16 +689,12 @@ int bus_add_driver(struct device_driver
printk(KERN_ERR "%s: uevent attr (%s) failed\n",
__func__, drv->name);
}
@@ -73,7 +73,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (!drv->suppress_bind_attrs) {
error = add_bind_files(drv);
-@@ -765,7 +730,6 @@ void bus_remove_driver(struct device_dri
+@@ -766,7 +731,6 @@ void bus_remove_driver(struct device_dri
if (!drv->suppress_bind_attrs)
remove_bind_files(drv);