aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-06 14:45:51 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-06 14:45:51 +0200
commit6e287ace225948565fdcbe3c5cc75d3843af79d0 (patch)
treec8da80c9a0686704f6abacaf5677087bff5e8370
parent40a2bc5b5c03c7219f40be1f5be51089a156b974 (diff)
downloadpatches-6e287ace225948565fdcbe3c5cc75d3843af79d0.tar.gz
cleaned up the bus_type.dev_attrs patch series
-rw-r--r--amba-use-dev_groups-and-not-dev_attrs-for-bus_type.patch (renamed from p22.patch)24
-rw-r--r--arm-ecard-use-dev_groups-and-not-dev_attrs-for.patch (renamed from p18.patch)32
-rw-r--r--driver-core-remove-struct-bus_type.dev_attrs.patch26
-rw-r--r--hid-intel-ish-hid-use-dev_groups-and-not-dev_attrs.patch55
-rw-r--r--hwtracing-intel_th-use-dev_groups-and-not-dev_attrs.patch31
-rw-r--r--macintosh-use-dev_groups-and-not-dev_attrs-for.patch (renamed from p26.patch)32
-rw-r--r--mips-sgi-ip22-ecard-use-dev_groups-and-not-dev_attrs.patch (renamed from p19.patch)28
-rw-r--r--p21.patch99
-rw-r--r--p27.patch32
-rw-r--r--p30.patch14
-rw-r--r--p31.patch32
-rw-r--r--parisc-parisc_bus_type-use-dev_groups-and-not.patch (renamed from p20.patch)27
-rw-r--r--powerpc-ibmebus-use-dev_groups-and-not-dev_attrs-for.patch (renamed from p28.patch)31
-rw-r--r--powerpc-ps3-use-dev_groups-and-not-dev_attrs-for.patch53
-rw-r--r--powerpc-vio-use-dev_groups-and-not-dev_attrs-for.patch80
-rw-r--r--powerpc-vio_cmo-use-dev_groups-and-not-dev_attrs-for.patch (renamed from p29.patch)50
-rw-r--r--rpmsg-use-dev_groups-and-not-dev_attrs-for-bus_type.patch (renamed from p23.patch)31
-rw-r--r--series29
-rw-r--r--sh-superhyway-use-dev_groups-and-not-dev_attrs-for.patch (renamed from p25.patch)36
-rw-r--r--sparc-vio-use-dev_groups-and-not-dev_attrs-for.patch67
20 files changed, 549 insertions, 260 deletions
diff --git a/p22.patch b/amba-use-dev_groups-and-not-dev_attrs-for-bus_type.patch
index d64c4e91a6c22..0e0cc71e84cb5 100644
--- a/p22.patch
+++ b/amba-use-dev_groups-and-not-dev_attrs-for-bus_type.patch
@@ -1,10 +1,23 @@
+From ebeaed29497ada5c0bf20638518813a06a218030 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:16:49 +0200
+Subject: [PATCH 04/15] amba: use dev_groups and not dev_attrs for bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: Russell King <linux@armlinux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- drivers/amba/bus.c | 25 ++++++++++++-------------
+ drivers/amba/bus.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
+diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
+index a56fa2a1e9aa..e0f74ddc22b7 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
-@@ -105,6 +105,7 @@ static ssize_t driver_override_store(str
+@@ -105,6 +105,7 @@ static ssize_t driver_override_store(struct device *_dev,
return count;
}
@@ -12,7 +25,7 @@
#define amba_attr_func(name,fmt,arg...) \
static ssize_t name##_show(struct device *_dev, \
-@@ -112,25 +113,23 @@ static ssize_t name##_show(struct device
+@@ -112,25 +113,23 @@ static ssize_t name##_show(struct device *_dev, \
{ \
struct amba_device *dev = to_amba_device(_dev); \
return sprintf(buf, fmt, arg); \
@@ -48,7 +61,7 @@
#ifdef CONFIG_PM
/*
-@@ -192,7 +191,7 @@ static const struct dev_pm_ops amba_pm =
+@@ -192,7 +191,7 @@ static const struct dev_pm_ops amba_pm = {
*/
struct bus_type amba_bustype = {
.name = "amba",
@@ -57,3 +70,6 @@
.match = amba_match,
.uevent = amba_uevent,
.pm = &amba_pm,
+--
+2.13.0
+
diff --git a/p18.patch b/arm-ecard-use-dev_groups-and-not-dev_attrs-for.patch
index 131a0ad359c70..1f5dea91cd8b3 100644
--- a/p18.patch
+++ b/arm-ecard-use-dev_groups-and-not-dev_attrs-for.patch
@@ -1,13 +1,25 @@
+From 615a45f8c8ff405ed65ccd5a798080ae4e1f0af5 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:14:16 +0200
+Subject: [PATCH 01/15] arm: ecard: use dev_groups and not dev_attrs for
+ bus_type
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
-
+Cc: Russell King <linux@armlinux.org.uk>
+Cc: <linux-arm-kernel@lists.infradead.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- arch/arm/mach-rpc/ecard.c | 38 ++++++++++++++++++++++----------------
- 1 file changed, 22 insertions(+), 16 deletions(-)
+ arch/arm/mach-rpc/ecard.c | 40 +++++++++++++++++++++++-----------------
+ 1 file changed, 23 insertions(+), 17 deletions(-)
+diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
+index 6b279d037774..f75b8b562d57 100644
--- a/arch/arm/mach-rpc/ecard.c
+++ b/arch/arm/mach-rpc/ecard.c
-@@ -761,19 +761,21 @@ static struct expansion_card *__init eca
+@@ -761,19 +761,21 @@ static struct expansion_card *__init ecard_alloc_card(int type, int slot)
return ec;
}
@@ -32,7 +44,7 @@
{
struct expansion_card *ec = ECARD_DEV(dev);
char *str = buf;
-@@ -787,35 +789,39 @@ static ssize_t ecard_show_resources(stru
+@@ -787,35 +789,39 @@ static ssize_t ecard_show_resources(struct device *dev, struct device_attribute
return str - buf;
}
@@ -60,8 +72,7 @@
struct expansion_card *ec = ECARD_DEV(dev);
return sprintf(buf, "%s\n", ec->easi ? "EASI" : "IOC");
}
-+static DEVICE_ATTR_RO(type);
-
+-
-static struct device_attribute ecard_dev_attrs[] = {
- __ATTR(device, S_IRUGO, ecard_show_device, NULL),
- __ATTR(dma, S_IRUGO, ecard_show_dma, NULL),
@@ -70,6 +81,8 @@
- __ATTR(type, S_IRUGO, ecard_show_type, NULL),
- __ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL),
- __ATTR_NULL,
++static DEVICE_ATTR_RO(type);
++
+static struct attribute *ecard_dev_attrs[] = {
+ &dev_attr_device.attr,
+ &dev_attr_dma.attr,
@@ -84,7 +97,7 @@
int ecard_request_resources(struct expansion_card *ec)
{
-@@ -1120,7 +1126,7 @@ static int ecard_match(struct device *_d
+@@ -1120,7 +1126,7 @@ static int ecard_match(struct device *_dev, struct device_driver *_drv)
struct bus_type ecard_bus_type = {
.name = "ecard",
@@ -93,3 +106,6 @@
.match = ecard_match,
.probe = ecard_drv_probe,
.remove = ecard_drv_remove,
+--
+2.13.0
+
diff --git a/driver-core-remove-struct-bus_type.dev_attrs.patch b/driver-core-remove-struct-bus_type.dev_attrs.patch
index 5dd806bda95e6..f8fb2d3c4c4fa 100644
--- a/driver-core-remove-struct-bus_type.dev_attrs.patch
+++ b/driver-core-remove-struct-bus_type.dev_attrs.patch
@@ -1,8 +1,7 @@
-From foo@baz Fri Aug 23 14:12:09 PDT 2013
-Date: Fri, 23 Aug 2013 14:12:09 -0700
-To: Greg KH <gregkh@linuxfoundation.org>
+From eadcf44e93770c9816135dcfe742e6734c4b05f2 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: driver-core: remove struct bus_type.dev_attrs
+Date: Fri, 23 Aug 2013 14:12:09 -0700
+Subject: [PATCH 15/15] driver-core: remove struct bus_type.dev_attrs
Now that all in-kernel users of bus_type.dev_attrs have been converted
to use dev_groups instead, the dev_attrs field, and logic surrounding
@@ -10,13 +9,15 @@ it, can be removed.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- drivers/base/bus.c | 37 +------------------------------------
- include/linux/device.h | 2 --
+ drivers/base/bus.c | 37 +------------------------------------
+ include/linux/device.h | 2 --
2 files changed, 1 insertion(+), 38 deletions(-)
+diff --git a/drivers/base/bus.c b/drivers/base/bus.c
+index 6470eb8088f4..66efc4b806c2 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
-@@ -466,35 +466,6 @@ int bus_for_each_drv(struct bus_type *bu
+@@ -466,35 +466,6 @@ int bus_for_each_drv(struct bus_type *bus, struct device_driver *start,
}
EXPORT_SYMBOL_GPL(bus_for_each_drv);
@@ -66,7 +67,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
error = sysfs_create_link(&bus->p->devices_kset->kobj,
&dev->kobj, dev_name(dev));
if (error)
-@@ -532,8 +500,6 @@ out_subsys:
+@@ -532,8 +500,6 @@ int bus_add_device(struct device *dev)
sysfs_remove_link(&bus->p->devices_kset->kobj, dev_name(dev));
out_groups:
device_remove_groups(dev, bus->dev_groups);
@@ -75,7 +76,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
out_put:
bus_put(dev->bus);
return error;
-@@ -590,7 +556,6 @@ void bus_remove_device(struct device *de
+@@ -590,7 +556,6 @@ void bus_remove_device(struct device *dev)
sysfs_remove_link(&dev->kobj, "subsystem");
sysfs_remove_link(&dev->bus->p->devices_kset->kobj,
dev_name(dev));
@@ -83,9 +84,11 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
device_remove_groups(dev, dev->bus->dev_groups);
if (klist_node_attached(&dev->p->knode_bus))
klist_del(&dev->p->knode_bus);
+diff --git a/include/linux/device.h b/include/linux/device.h
+index 9ef518af5515..a04860932ceb 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
-@@ -66,7 +66,6 @@ extern void bus_remove_file(struct bus_t
+@@ -66,7 +66,6 @@ extern void bus_remove_file(struct bus_type *, struct bus_attribute *);
* @name: The name of the bus.
* @dev_name: Used for subsystems to enumerate devices like ("foo%u", dev->id).
* @dev_root: Default device to use as the parent.
@@ -101,3 +104,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
const struct attribute_group **bus_groups;
const struct attribute_group **dev_groups;
const struct attribute_group **drv_groups;
+--
+2.13.0
+
diff --git a/hid-intel-ish-hid-use-dev_groups-and-not-dev_attrs.patch b/hid-intel-ish-hid-use-dev_groups-and-not-dev_attrs.patch
new file mode 100644
index 0000000000000..9eeaadcff0433
--- /dev/null
+++ b/hid-intel-ish-hid-use-dev_groups-and-not-dev_attrs.patch
@@ -0,0 +1,55 @@
+From bb3f4435ebc17dd35891f434dbbf0d53f46264b7 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:17:37 +0200
+Subject: [PATCH 13/15] hid: intel-ish-hid: use dev_groups and not dev_attrs
+ for bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+Cc: Jiri Kosina <jikos@kernel.org>
+Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Cc: Wei Yongjun <weiyj.lk@gmail.com>
+Cc: Bhumika Goyal <bhumirks@gmail.com>
+Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
+Cc: <linux-input@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/hid/intel-ish-hid/ishtp/bus.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c
+index 5f382fedc2ab..f272cdd9bd55 100644
+--- a/drivers/hid/intel-ish-hid/ishtp/bus.c
++++ b/drivers/hid/intel-ish-hid/ishtp/bus.c
+@@ -321,11 +321,13 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *a,
+ len = snprintf(buf, PAGE_SIZE, "ishtp:%s\n", dev_name(dev));
+ return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
+ }
++static DEVICE_ATTR_RO(modalias);
+
+-static struct device_attribute ishtp_cl_dev_attrs[] = {
+- __ATTR_RO(modalias),
+- __ATTR_NULL,
++static struct attribute *ishtp_cl_dev_attrs[] = {
++ &dev_attr_modalias.attr,
++ NULL,
+ };
++ATTRIBUTE_GROUPS(ishtp_cl_dev);
+
+ static int ishtp_cl_uevent(struct device *dev, struct kobj_uevent_env *env)
+ {
+@@ -346,7 +348,7 @@ static const struct dev_pm_ops ishtp_cl_bus_dev_pm_ops = {
+
+ static struct bus_type ishtp_cl_bus_type = {
+ .name = "ishtp",
+- .dev_attrs = ishtp_cl_dev_attrs,
++ .dev_groups = ishtp_cl_dev_groups,
+ .probe = ishtp_cl_device_probe,
+ .remove = ishtp_cl_device_remove,
+ .pm = &ishtp_cl_bus_dev_pm_ops,
+--
+2.13.0
+
diff --git a/hwtracing-intel_th-use-dev_groups-and-not-dev_attrs.patch b/hwtracing-intel_th-use-dev_groups-and-not-dev_attrs.patch
new file mode 100644
index 0000000000000..2a965f2c359f1
--- /dev/null
+++ b/hwtracing-intel_th-use-dev_groups-and-not-dev_attrs.patch
@@ -0,0 +1,31 @@
+From 27dd656ca65f0b5a9c94d5c4b575bcf96d402a71 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:17:32 +0200
+Subject: [PATCH 12/15] hwtracing: intel_th: use dev_groups and not dev_attrs
+ for bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/hwtracing/intel_th/core.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
+index 7563eceeaaea..8da567abc0ce 100644
+--- a/drivers/hwtracing/intel_th/core.c
++++ b/drivers/hwtracing/intel_th/core.c
+@@ -139,7 +139,6 @@ static int intel_th_remove(struct device *dev)
+
+ static struct bus_type intel_th_bus = {
+ .name = "intel_th",
+- .dev_attrs = NULL,
+ .match = intel_th_match,
+ .probe = intel_th_probe,
+ .remove = intel_th_remove,
+--
+2.13.0
+
diff --git a/p26.patch b/macintosh-use-dev_groups-and-not-dev_attrs-for.patch
index aa898527fcea5..2d9bcfc064715 100644
--- a/p26.patch
+++ b/macintosh-use-dev_groups-and-not-dev_attrs-for.patch
@@ -1,11 +1,26 @@
+From 9c98764f08dcf66e70db89f6a13493af87fe1b29 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:17:12 +0200
+Subject: [PATCH 07/15] macintosh: use dev_groups and not dev_attrs for
+ bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Cc: <linuxppc-dev@lists.ozlabs.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- drivers/macintosh/macio_asic.c | 4 ++--
- drivers/macintosh/macio_sysfs.c | 29 +++++++++++++++++++++--------
+ drivers/macintosh/macio_asic.c | 4 ++--
+ drivers/macintosh/macio_sysfs.c | 29 +++++++++++++++++++++--------
2 files changed, 23 insertions(+), 10 deletions(-)
+diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
+index f757cef293f8..62f541f968f6 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
-@@ -133,7 +133,7 @@ static int macio_device_resume(struct de
+@@ -133,7 +133,7 @@ static int macio_device_resume(struct device * dev)
return 0;
}
@@ -23,9 +38,11 @@
};
static int __init macio_bus_driver_init(void)
+diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c
+index 0b1f9c76c68d..2445274f7e4b 100644
--- a/drivers/macintosh/macio_sysfs.c
+++ b/drivers/macintosh/macio_sysfs.c
-@@ -10,7 +10,8 @@ field##_show (struct device *dev, struct
+@@ -10,7 +10,8 @@ field##_show (struct device *dev, struct device_attribute *attr, \
{ \
struct macio_dev *mdev = to_macio_device (dev); \
return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \
@@ -35,7 +52,7 @@
static ssize_t
compatible_show (struct device *dev, struct device_attribute *attr, char *buf)
-@@ -37,6 +38,7 @@ compatible_show (struct device *dev, str
+@@ -37,6 +38,7 @@ compatible_show (struct device *dev, struct device_attribute *attr, char *buf)
return length;
}
@@ -43,7 +60,7 @@
static ssize_t modalias_show (struct device *dev, struct device_attribute *attr,
char *buf)
-@@ -52,15 +54,26 @@ static ssize_t devspec_show(struct devic
+@@ -52,15 +54,26 @@ static ssize_t devspec_show(struct device *dev,
ofdev = to_platform_device(dev);
return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name);
}
@@ -77,3 +94,6 @@
+ &macio_dev_group,
+ NULL,
};
+--
+2.13.0
+
diff --git a/p19.patch b/mips-sgi-ip22-ecard-use-dev_groups-and-not-dev_attrs.patch
index 0b318722de08f..dbbd5e7450fcd 100644
--- a/p19.patch
+++ b/mips-sgi-ip22-ecard-use-dev_groups-and-not-dev_attrs.patch
@@ -1,10 +1,25 @@
+From 4f2dae5540fab0aec0e0c6d403346d55cdbf5147 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:16:30 +0200
+Subject: [PATCH 02/15] mips: sgi-ip22: ecard: use dev_groups and not dev_attrs
+ for bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: Ralf Baechle <ralf@linux-mips.org>
+Cc: <linux-mips@linux-mips.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- arch/mips/sgi-ip22/ip22-gio.c | 16 ++++++++++------
+ arch/mips/sgi-ip22/ip22-gio.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
+diff --git a/arch/mips/sgi-ip22/ip22-gio.c b/arch/mips/sgi-ip22/ip22-gio.c
+index cdf187600010..b225033aade6 100644
--- a/arch/mips/sgi-ip22/ip22-gio.c
+++ b/arch/mips/sgi-ip22/ip22-gio.c
-@@ -169,6 +169,7 @@ static ssize_t modalias_show(struct devi
+@@ -169,6 +169,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *a,
return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
}
@@ -12,7 +27,7 @@
static ssize_t name_show(struct device *dev,
struct device_attribute *attr, char *buf)
-@@ -178,6 +179,7 @@ static ssize_t name_show(struct device *
+@@ -178,6 +179,7 @@ static ssize_t name_show(struct device *dev,
giodev = to_gio_device(dev);
return sprintf(buf, "%s", giodev->name);
}
@@ -20,7 +35,7 @@
static ssize_t id_show(struct device *dev,
struct device_attribute *attr, char *buf)
-@@ -187,13 +189,15 @@ static ssize_t id_show(struct device *de
+@@ -187,13 +189,15 @@ static ssize_t id_show(struct device *dev,
giodev = to_gio_device(dev);
return sprintf(buf, "%x", giodev->id.id);
}
@@ -41,7 +56,7 @@
static int gio_device_uevent(struct device *dev, struct kobj_uevent_env *env)
{
-@@ -374,7 +378,7 @@ static void ip22_check_gio(int slotno, u
+@@ -374,7 +378,7 @@ static void ip22_check_gio(int slotno, unsigned long addr, int irq)
static struct bus_type gio_bus_type = {
.name = "gio",
@@ -50,3 +65,6 @@
.match = gio_bus_match,
.probe = gio_device_probe,
.remove = gio_device_remove,
+--
+2.13.0
+
diff --git a/p21.patch b/p21.patch
deleted file mode 100644
index 0219dd6b92ca8..0000000000000
--- a/p21.patch
+++ /dev/null
@@ -1,99 +0,0 @@
----
- arch/powerpc/platforms/pseries/vio.c | 12 +++++++++++-
- arch/sparc/kernel/vio.c | 18 +++++++++++-------
- 2 files changed, 22 insertions(+), 8 deletions(-)
-
---- a/arch/powerpc/platforms/pseries/vio.c
-+++ b/arch/powerpc/platforms/pseries/vio.c
-@@ -1537,6 +1537,7 @@ static ssize_t name_show(struct device *
- {
- return sprintf(buf, "%s\n", to_vio_dev(dev)->name);
- }
-+static DEVICE_ATTR_RO(name);
-
- static ssize_t devspec_show(struct device *dev,
- struct device_attribute *attr, char *buf)
-@@ -1545,6 +1546,7 @@ static ssize_t devspec_show(struct devic
-
- return sprintf(buf, "%s\n", of_node_full_name(of_node));
- }
-+static DEVICE_ATTR_RO(devspec);
-
- static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
- char *buf)
-@@ -1566,6 +1568,7 @@ static ssize_t modalias_show(struct devi
-
- return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp);
- }
-+static DEVICE_ATTR_RO(modalias);
-
- static struct device_attribute vio_dev_attrs[] = {
- __ATTR_RO(name),
-@@ -1573,6 +1576,13 @@ static struct device_attribute vio_dev_a
- __ATTR_RO(modalias),
- __ATTR_NULL
- };
-+static struct attribute *vio_dev_attrs[] = {
-+ &dev_attr_name.attr,
-+ &dev_attr_devspec.attr,
-+ &dev_attr_modalias.attr,
-+ NULL,
-+};
-+ATTRIBUTE_GROUPS(vio_dev);
-
- void vio_unregister_device(struct vio_dev *viodev)
- {
-@@ -1608,7 +1618,7 @@ static int vio_hotplug(struct device *de
-
- struct bus_type vio_bus_type = {
- .name = "vio",
-- .dev_attrs = vio_dev_attrs,
-+ .dev_groups = vio_dev_groups,
- .uevent = vio_hotplug,
- .match = vio_bus_match,
- .probe = vio_bus_probe,
---- a/arch/sparc/kernel/vio.c
-+++ b/arch/sparc/kernel/vio.c
-@@ -105,6 +105,7 @@ static ssize_t devspec_show(struct devic
-
- return sprintf(buf, "%s\n", str);
- }
-+static DEVICE_ATTR_RO(devspec);
-
- static ssize_t type_show(struct device *dev,
- struct device_attribute *attr, char *buf)
-@@ -112,6 +113,7 @@ static ssize_t type_show(struct device *
- struct vio_dev *vdev = to_vio_dev(dev);
- return sprintf(buf, "%s\n", vdev->type);
- }
-+static DEVICE_ATTR_RO(type);
-
- static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
- char *buf)
-@@ -120,17 +122,19 @@ static ssize_t modalias_show(struct devi
-
- return sprintf(buf, "vio:T%sS%s\n", vdev->type, vdev->compat);
- }
-+static DEVICE_ATTR_RO(modalias);
-
--static struct device_attribute vio_dev_attrs[] = {
-- __ATTR_RO(devspec),
-- __ATTR_RO(type),
-- __ATTR_RO(modalias),
-- __ATTR_NULL
--};
-+static struct attribute *vio_dev_attrs[] = {
-+ &dev_attr_devspec.attr,
-+ &dev_attr_type.attr,
-+ &dev_attr_modalias.attr,
-+ NULL,
-+ };
-+ATTRIBUTE_GROUPS(vio_dev);
-
- static struct bus_type vio_bus_type = {
- .name = "vio",
-- .dev_attrs = vio_dev_attrs,
-+ .dev_groups = vio_dev_groups,
- .uevent = vio_hotplug,
- .match = vio_bus_match,
- .probe = vio_device_probe,
diff --git a/p27.patch b/p27.patch
deleted file mode 100644
index 2d9ee69d48ec5..0000000000000
--- a/p27.patch
+++ /dev/null
@@ -1,32 +0,0 @@
----
- arch/powerpc/platforms/ps3/system-bus.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
---- a/arch/powerpc/platforms/ps3/system-bus.c
-+++ b/arch/powerpc/platforms/ps3/system-bus.c
-@@ -471,11 +471,13 @@ static ssize_t modalias_show(struct devi
-
- return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
- }
-+static DEVICE_ATTR_RO(modalias);
-
--static struct device_attribute ps3_system_bus_dev_attrs[] = {
-- __ATTR_RO(modalias),
-- __ATTR_NULL,
-+static struct attribute *ps3_system_bus_dev_attrs[] = {
-+ &dev_attr_modalias.attr,
-+ NULL,
- };
-+ATTRIBUTE_GROUPS(ps3_system_bus);
-
- struct bus_type ps3_system_bus_type = {
- .name = "ps3_system_bus",
-@@ -484,7 +486,7 @@ struct bus_type ps3_system_bus_type = {
- .probe = ps3_system_bus_probe,
- .remove = ps3_system_bus_remove,
- .shutdown = ps3_system_bus_shutdown,
-- .dev_attrs = ps3_system_bus_dev_attrs,
-+ .dev_groups = ps3_system_bus_dev_groups,
- };
-
- static int __init ps3_system_bus_init(void)
diff --git a/p30.patch b/p30.patch
deleted file mode 100644
index 75d041de3a8e9..0000000000000
--- a/p30.patch
+++ /dev/null
@@ -1,14 +0,0 @@
----
- drivers/hwtracing/intel_th/core.c | 1 -
- 1 file changed, 1 deletion(-)
-
---- a/drivers/hwtracing/intel_th/core.c
-+++ b/drivers/hwtracing/intel_th/core.c
-@@ -139,7 +139,6 @@ static int intel_th_remove(struct device
-
- static struct bus_type intel_th_bus = {
- .name = "intel_th",
-- .dev_attrs = NULL,
- .match = intel_th_match,
- .probe = intel_th_probe,
- .remove = intel_th_remove,
diff --git a/p31.patch b/p31.patch
deleted file mode 100644
index ce0c9da626fb3..0000000000000
--- a/p31.patch
+++ /dev/null
@@ -1,32 +0,0 @@
----
- drivers/hid/intel-ish-hid/ishtp/bus.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
---- a/drivers/hid/intel-ish-hid/ishtp/bus.c
-+++ b/drivers/hid/intel-ish-hid/ishtp/bus.c
-@@ -321,11 +321,13 @@ static ssize_t modalias_show(struct devi
- len = snprintf(buf, PAGE_SIZE, "ishtp:%s\n", dev_name(dev));
- return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
- }
-+static DEVICE_ATTR_RO(modalias);
-
--static struct device_attribute ishtp_cl_dev_attrs[] = {
-- __ATTR_RO(modalias),
-- __ATTR_NULL,
-+static struct attribute *ishtp_cl_dev_attrs[] = {
-+ &dev_attr_modalias.attr,
-+ NULL,
- };
-+ATTRIBUTE_GROUPS(ishtp_cl_dev);
-
- static int ishtp_cl_uevent(struct device *dev, struct kobj_uevent_env *env)
- {
-@@ -346,7 +348,7 @@ static const struct dev_pm_ops ishtp_cl_
-
- static struct bus_type ishtp_cl_bus_type = {
- .name = "ishtp",
-- .dev_attrs = ishtp_cl_dev_attrs,
-+ .dev_groups = ishtp_cl_dev_groups,
- .probe = ishtp_cl_device_probe,
- .remove = ishtp_cl_device_remove,
- .pm = &ishtp_cl_bus_dev_pm_ops,
diff --git a/p20.patch b/parisc-parisc_bus_type-use-dev_groups-and-not.patch
index d432c0b05d637..815cbb91b9e8d 100644
--- a/p20.patch
+++ b/parisc-parisc_bus_type-use-dev_groups-and-not.patch
@@ -1,10 +1,28 @@
+From 5f64c0b69bc01c390049c6ccf29c5a785967db55 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:16:38 +0200
+Subject: [PATCH 03/15] parisc: parisc_bus_type: use dev_groups and not
+ dev_attrs for bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
+Cc: Helge Deller <deller@gmx.de>
+Cc: Bart Van Assche <bart.vanassche@sandisk.com>
+Cc: Doug Ledford <dledford@redhat.com>
+Cc: <linux-parisc@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- arch/parisc/kernel/drivers.c | 23 +++++++++++++----------
+ arch/parisc/kernel/drivers.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
+diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c
+index fa78419100c8..d8f77358e2ba 100644
--- a/arch/parisc/kernel/drivers.c
+++ b/arch/parisc/kernel/drivers.c
-@@ -575,7 +575,8 @@ static ssize_t name##_show(struct device
+@@ -575,7 +575,8 @@ static ssize_t name##_show(struct device *dev, struct device_attribute *attr, ch
{ \
struct parisc_device *padev = to_parisc_device(dev); \
return sprintf(buf, format_string, padev->field); \
@@ -14,7 +32,7 @@
#define pa_dev_attr_id(field, format) pa_dev_attr(field, id.field, format)
-@@ -589,22 +590,24 @@ static ssize_t modalias_show(struct devi
+@@ -589,22 +590,24 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
{
return make_modalias(dev, buf);
}
@@ -48,3 +66,6 @@
.probe = parisc_driver_probe,
.remove = parisc_driver_remove,
};
+--
+2.13.0
+
diff --git a/p28.patch b/powerpc-ibmebus-use-dev_groups-and-not-dev_attrs-for.patch
index 66a9ef27869dd..e16c9363c4931 100644
--- a/p28.patch
+++ b/powerpc-ibmebus-use-dev_groups-and-not-dev_attrs-for.patch
@@ -1,10 +1,32 @@
+From 9488fff3745e9ca239eaecccd981ade46c57b6d6 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:17:22 +0200
+Subject: [PATCH 09/15] powerpc: ibmebus: use dev_groups and not dev_attrs for
+ bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Michael Ellerman <mpe@ellerman.id.au>
+Cc: Bart Van Assche <bart.vanassche@sandisk.com>
+Cc: Johan Hovold <johan@kernel.org>
+Cc: Robin Murphy <robin.murphy@arm.com>
+Cc: Rob Herring <robh@kernel.org>
+Cc: Lars-Peter Clausen <lars@metafoo.de>
+Cc: <linuxppc-dev@lists.ozlabs.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- arch/powerpc/platforms/pseries/ibmebus.c | 16 ++++++++++------
+ arch/powerpc/platforms/pseries/ibmebus.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
+diff --git a/arch/powerpc/platforms/pseries/ibmebus.c b/arch/powerpc/platforms/pseries/ibmebus.c
+index b363e439ddb9..52146b1356d2 100644
--- a/arch/powerpc/platforms/pseries/ibmebus.c
+++ b/arch/powerpc/platforms/pseries/ibmebus.c
-@@ -397,6 +397,7 @@ static ssize_t devspec_show(struct devic
+@@ -397,6 +397,7 @@ static ssize_t devspec_show(struct device *dev,
ofdev = to_platform_device(dev);
return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name);
}
@@ -12,7 +34,7 @@
static ssize_t name_show(struct device *dev,
struct device_attribute *attr, char *buf)
-@@ -406,19 +407,22 @@ static ssize_t name_show(struct device *
+@@ -406,19 +407,22 @@ static ssize_t name_show(struct device *dev,
ofdev = to_platform_device(dev);
return sprintf(buf, "%s\n", ofdev->dev.of_node->name);
}
@@ -49,3 +71,6 @@
};
EXPORT_SYMBOL(ibmebus_bus_type);
+--
+2.13.0
+
diff --git a/powerpc-ps3-use-dev_groups-and-not-dev_attrs-for.patch b/powerpc-ps3-use-dev_groups-and-not-dev_attrs-for.patch
new file mode 100644
index 0000000000000..11f9066724e7b
--- /dev/null
+++ b/powerpc-ps3-use-dev_groups-and-not-dev_attrs-for.patch
@@ -0,0 +1,53 @@
+From d80b7d6c7484dd5133471a23d3a24f32d20ad2fd Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:17:17 +0200
+Subject: [PATCH 08/15] powerpc: ps3: use dev_groups and not dev_attrs for
+ bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: Geoff Levand <geoff@infradead.org>
+Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Michael Ellerman <mpe@ellerman.id.au>
+Cc: <linuxppc-dev@lists.ozlabs.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/platforms/ps3/system-bus.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
+index 2d2e5f80a3d3..3e98b4ea3df9 100644
+--- a/arch/powerpc/platforms/ps3/system-bus.c
++++ b/arch/powerpc/platforms/ps3/system-bus.c
+@@ -471,11 +471,13 @@ static ssize_t modalias_show(struct device *_dev, struct device_attribute *a,
+
+ return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
+ }
++static DEVICE_ATTR_RO(modalias);
+
+-static struct device_attribute ps3_system_bus_dev_attrs[] = {
+- __ATTR_RO(modalias),
+- __ATTR_NULL,
++static struct attribute *ps3_system_bus_dev_attrs[] = {
++ &dev_attr_modalias.attr,
++ NULL,
+ };
++ATTRIBUTE_GROUPS(ps3_system_bus);
+
+ struct bus_type ps3_system_bus_type = {
+ .name = "ps3_system_bus",
+@@ -484,7 +486,7 @@ struct bus_type ps3_system_bus_type = {
+ .probe = ps3_system_bus_probe,
+ .remove = ps3_system_bus_remove,
+ .shutdown = ps3_system_bus_shutdown,
+- .dev_attrs = ps3_system_bus_dev_attrs,
++ .dev_groups = ps3_system_bus_dev_groups,
+ };
+
+ static int __init ps3_system_bus_init(void)
+--
+2.13.0
+
diff --git a/powerpc-vio-use-dev_groups-and-not-dev_attrs-for.patch b/powerpc-vio-use-dev_groups-and-not-dev_attrs-for.patch
new file mode 100644
index 0000000000000..e45ca09f0a788
--- /dev/null
+++ b/powerpc-vio-use-dev_groups-and-not-dev_attrs-for.patch
@@ -0,0 +1,80 @@
+From 9884e02b635cadec6924b0d6851282263879f98d Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:26:12 +0200
+Subject: [PATCH 10/15] powerpc: vio: use dev_groups and not dev_attrs for
+ bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Michael Ellerman <mpe@ellerman.id.au>
+Cc: Vineet Gupta <vgupta@synopsys.com>
+Cc: Bart Van Assche <bart.vanassche@sandisk.com>
+Cc: Robin Murphy <robin.murphy@arm.com>
+Cc: Joerg Roedel <jroedel@suse.de>
+Cc: Johan Hovold <johan@kernel.org>
+Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
+Cc: Krzysztof Kozlowski <krzk@kernel.org>
+Cc: <linuxppc-dev@lists.ozlabs.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/platforms/pseries/vio.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c
+index 28b09fd797ec..fd6595598662 100644
+--- a/arch/powerpc/platforms/pseries/vio.c
++++ b/arch/powerpc/platforms/pseries/vio.c
+@@ -1537,6 +1537,7 @@ static ssize_t name_show(struct device *dev,
+ {
+ return sprintf(buf, "%s\n", to_vio_dev(dev)->name);
+ }
++static DEVICE_ATTR_RO(name);
+
+ static ssize_t devspec_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+@@ -1545,6 +1546,7 @@ static ssize_t devspec_show(struct device *dev,
+
+ return sprintf(buf, "%s\n", of_node_full_name(of_node));
+ }
++static DEVICE_ATTR_RO(devspec);
+
+ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
+@@ -1566,6 +1568,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
+
+ return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp);
+ }
++static DEVICE_ATTR_RO(modalias);
+
+ static struct device_attribute vio_dev_attrs[] = {
+ __ATTR_RO(name),
+@@ -1573,6 +1576,13 @@ static struct device_attribute vio_dev_attrs[] = {
+ __ATTR_RO(modalias),
+ __ATTR_NULL
+ };
++static struct attribute *vio_dev_attrs[] = {
++ &dev_attr_name.attr,
++ &dev_attr_devspec.attr,
++ &dev_attr_modalias.attr,
++ NULL,
++};
++ATTRIBUTE_GROUPS(vio_dev);
+
+ void vio_unregister_device(struct vio_dev *viodev)
+ {
+@@ -1608,7 +1618,7 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)
+
+ struct bus_type vio_bus_type = {
+ .name = "vio",
+- .dev_attrs = vio_dev_attrs,
++ .dev_groups = vio_dev_groups,
+ .uevent = vio_hotplug,
+ .match = vio_bus_match,
+ .probe = vio_bus_probe,
+--
+2.13.0
+
diff --git a/p29.patch b/powerpc-vio_cmo-use-dev_groups-and-not-dev_attrs-for.patch
index cfcab89ff158e..256ebabcf62fa 100644
--- a/p29.patch
+++ b/powerpc-vio_cmo-use-dev_groups-and-not-dev_attrs-for.patch
@@ -1,7 +1,31 @@
+From fc258d29b0306327b379f07610384566fca1a921 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:17:27 +0200
+Subject: [PATCH 11/15] powerpc: vio_cmo: use dev_groups and not dev_attrs for
+ bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Michael Ellerman <mpe@ellerman.id.au>
+Cc: Vineet Gupta <vgupta@synopsys.com>
+Cc: Bart Van Assche <bart.vanassche@sandisk.com>
+Cc: Robin Murphy <robin.murphy@arm.com>
+Cc: Joerg Roedel <jroedel@suse.de>
+Cc: Johan Hovold <johan@kernel.org>
+Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
+Cc: Krzysztof Kozlowski <krzk@kernel.org>
+Cc: <linuxppc-dev@lists.ozlabs.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- arch/powerpc/platforms/pseries/vio.c | 43 +++++++++++++++++------------------
- 1 file changed, 22 insertions(+), 21 deletions(-)
+ arch/powerpc/platforms/pseries/vio.c | 37 +++++++++++++++++++++---------------
+ 1 file changed, 22 insertions(+), 15 deletions(-)
+diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c
+index fd6595598662..176edf422867 100644
--- a/arch/powerpc/platforms/pseries/vio.c
+++ b/arch/powerpc/platforms/pseries/vio.c
@@ -948,7 +948,7 @@ static void vio_cmo_bus_init(void)
@@ -13,7 +37,7 @@
struct device_attribute *attr, \
char *buf) \
{ \
-@@ -962,7 +962,7 @@ static ssize_t viodev_cmo_allocs_failed_
+@@ -962,7 +962,7 @@ static ssize_t viodev_cmo_allocs_failed_show(struct device *dev,
return sprintf(buf, "%d\n", atomic_read(&viodev->cmo.allocs_failed));
}
@@ -22,7 +46,7 @@
struct device_attribute *attr, const char *buf, size_t count)
{
struct vio_dev *viodev = to_vio_dev(dev);
-@@ -970,7 +970,7 @@ static ssize_t viodev_cmo_allocs_failed_
+@@ -970,7 +970,7 @@ static ssize_t viodev_cmo_allocs_failed_reset(struct device *dev,
return count;
}
@@ -31,7 +55,7 @@
struct device_attribute *attr, const char *buf, size_t count)
{
struct vio_dev *viodev = to_vio_dev(dev);
-@@ -993,18 +993,25 @@ static ssize_t name_show(struct device *
+@@ -993,18 +993,25 @@ static ssize_t name_show(struct device *, struct device_attribute *, char *);
static ssize_t devspec_show(struct device *, struct device_attribute *, char *);
static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
char *buf);
@@ -77,16 +101,6 @@
vio_bus_type.bus_groups = vio_bus_groups;
}
#else /* CONFIG_PPC_SMLPAR */
-@@ -1570,12 +1577,6 @@ static ssize_t modalias_show(struct devi
- }
- static DEVICE_ATTR_RO(modalias);
-
--static struct device_attribute vio_dev_attrs[] = {
-- __ATTR_RO(name),
-- __ATTR_RO(devspec),
-- __ATTR_RO(modalias),
-- __ATTR_NULL
--};
- static struct attribute *vio_dev_attrs[] = {
- &dev_attr_name.attr,
- &dev_attr_devspec.attr,
+--
+2.13.0
+
diff --git a/p23.patch b/rpmsg-use-dev_groups-and-not-dev_attrs-for-bus_type.patch
index ca65e73be073f..15cc6536e5457 100644
--- a/p23.patch
+++ b/rpmsg-use-dev_groups-and-not-dev_attrs-for-bus_type.patch
@@ -1,7 +1,22 @@
+From b21650504edab3f878e015535faf1da5c534e589 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:16:54 +0200
+Subject: [PATCH 05/15] rpmsg: use dev_groups and not dev_attrs for bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: Ohad Ben-Cohen <ohad@wizery.com>
+Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
+Cc: <linux-remoteproc@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- drivers/rpmsg/rpmsg_core.c | 21 ++++++++++++---------
- 1 file changed, 12 insertions(+), 9 deletions(-)
+ drivers/rpmsg/rpmsg_core.c | 23 +++++++++++++----------
+ 1 file changed, 13 insertions(+), 10 deletions(-)
+diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c
+index 600f5f9f7431..ad3d2a9df287 100644
--- a/drivers/rpmsg/rpmsg_core.c
+++ b/drivers/rpmsg/rpmsg_core.c
@@ -330,7 +330,8 @@ field##_show(struct device *dev, \
@@ -14,12 +29,11 @@
/* for more info, see Documentation/ABI/testing/sysfs-bus-rpmsg */
rpmsg_show_attr(name, id.name, "%s\n");
-@@ -345,15 +346,17 @@ static ssize_t modalias_show(struct devi
+@@ -345,15 +346,17 @@ static ssize_t modalias_show(struct device *dev,
return sprintf(buf, RPMSG_DEVICE_MODALIAS_FMT "\n", rpdev->id.name);
}
-+static DEVICE_ATTR_RO(modalias);
-
+-
-static struct device_attribute rpmsg_dev_attrs[] = {
- __ATTR_RO(name),
- __ATTR_RO(modalias),
@@ -27,6 +41,8 @@
- __ATTR_RO(src),
- __ATTR_RO(announce),
- __ATTR_NULL
++static DEVICE_ATTR_RO(modalias);
++
+static struct attribute *rpmsg_dev_attrs[] = {
+ &dev_attr_name.attr,
+ &dev_attr_modalias.attr,
@@ -39,7 +55,7 @@
/* rpmsg devices and drivers are matched using the service name */
static inline int rpmsg_id_match(const struct rpmsg_device *rpdev,
-@@ -455,7 +458,7 @@ static int rpmsg_dev_remove(struct devic
+@@ -455,7 +458,7 @@ static int rpmsg_dev_remove(struct device *dev)
static struct bus_type rpmsg_bus = {
.name = "rpmsg",
.match = rpmsg_dev_match,
@@ -48,3 +64,6 @@
.uevent = rpmsg_uevent,
.probe = rpmsg_dev_probe,
.remove = rpmsg_dev_remove,
+--
+2.13.0
+
diff --git a/series b/series
index f70f1ea3bd7e6..ae2fab5aaddee 100644
--- a/series
+++ b/series
@@ -30,21 +30,22 @@ drivers-uio-un-restrict-sysfs-pointers-for-uio.patch
#
##gregkh/gkh-version.patch
#
+
+arm-ecard-use-dev_groups-and-not-dev_attrs-for.patch
+mips-sgi-ip22-ecard-use-dev_groups-and-not-dev_attrs.patch
+parisc-parisc_bus_type-use-dev_groups-and-not.patch
+amba-use-dev_groups-and-not-dev_attrs-for-bus_type.patch
+rpmsg-use-dev_groups-and-not-dev_attrs-for-bus_type.patch
+sh-superhyway-use-dev_groups-and-not-dev_attrs-for.patch
+macintosh-use-dev_groups-and-not-dev_attrs-for.patch
+powerpc-ps3-use-dev_groups-and-not-dev_attrs-for.patch
+powerpc-ibmebus-use-dev_groups-and-not-dev_attrs-for.patch
+powerpc-vio-use-dev_groups-and-not-dev_attrs-for.patch
+powerpc-vio_cmo-use-dev_groups-and-not-dev_attrs-for.patch
+hwtracing-intel_th-use-dev_groups-and-not-dev_attrs.patch
+hid-intel-ish-hid-use-dev_groups-and-not-dev_attrs.patch
+sparc-vio-use-dev_groups-and-not-dev_attrs-for.patch
driver-core-remove-struct-bus_type.dev_attrs.patch
-#
-p18.patch
-p19.patch
-p20.patch
-p21.patch
-p22.patch
-p23.patch
-p25.patch
-p26.patch
-p27.patch
-p28.patch
-p29.patch
-p30.patch
-p31.patch
c03.patch
c04.patch
diff --git a/p25.patch b/sh-superhyway-use-dev_groups-and-not-dev_attrs-for.patch
index a255f6fb51960..f07715231cdb7 100644
--- a/p25.patch
+++ b/sh-superhyway-use-dev_groups-and-not-dev_attrs-for.patch
@@ -1,12 +1,29 @@
+From f1d2517801ed106256cf2eaad461588b0e97274b Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:17:02 +0200
+Subject: [PATCH 06/15] sh: superhyway: use dev_groups and not dev_attrs for
+ bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
+Cc: Rich Felker <dalias@libc.org>
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: <linux-sh@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- drivers/sh/superhyway/superhyway-sysfs.c | 29 +++++++++++++++++++----------
- drivers/sh/superhyway/superhyway.c | 2 +-
- include/linux/superhyway.h | 2 +-
+ drivers/sh/superhyway/superhyway-sysfs.c | 29 +++++++++++++++++++----------
+ drivers/sh/superhyway/superhyway.c | 2 +-
+ include/linux/superhyway.h | 2 +-
3 files changed, 21 insertions(+), 12 deletions(-)
+diff --git a/drivers/sh/superhyway/superhyway-sysfs.c b/drivers/sh/superhyway/superhyway-sysfs.c
+index 55434330867b..774f31b564f8 100644
--- a/drivers/sh/superhyway/superhyway-sysfs.c
+++ b/drivers/sh/superhyway/superhyway-sysfs.c
-@@ -19,7 +19,8 @@ static ssize_t name##_show(struct device
+@@ -19,7 +19,8 @@ static ssize_t name##_show(struct device *dev, struct device_attribute *attr, ch
{ \
struct superhyway_device *s = to_superhyway_device(dev); \
return sprintf(buf, fmt, s->field); \
@@ -16,7 +33,7 @@
/* VCR flags */
superhyway_ro_attr(perr_flags, "0x%02x\n", vcr.perr_flags);
-@@ -32,14 +33,22 @@ superhyway_ro_attr(top_mb, "0x%02x\n", v
+@@ -32,14 +33,22 @@ superhyway_ro_attr(top_mb, "0x%02x\n", vcr.top_mb);
/* Misc */
superhyway_ro_attr(resource, "0x%08lx\n", resource[0].start);
@@ -48,6 +65,8 @@
+ &superhyway_dev_group,
+ NULL,
+};
+diff --git a/drivers/sh/superhyway/superhyway.c b/drivers/sh/superhyway/superhyway.c
+index bb1fb7712134..348836b90605 100644
--- a/drivers/sh/superhyway/superhyway.c
+++ b/drivers/sh/superhyway/superhyway.c
@@ -209,7 +209,7 @@ struct bus_type superhyway_bus_type = {
@@ -59,9 +78,11 @@
#endif
.probe = superhyway_device_probe,
.remove = superhyway_device_remove,
+diff --git a/include/linux/superhyway.h b/include/linux/superhyway.h
+index 17ea468fa362..8d3376775813 100644
--- a/include/linux/superhyway.h
+++ b/include/linux/superhyway.h
-@@ -101,7 +101,7 @@ int superhyway_add_device(unsigned long
+@@ -101,7 +101,7 @@ int superhyway_add_device(unsigned long base, struct superhyway_device *, struct
int superhyway_add_devices(struct superhyway_bus *bus, struct superhyway_device **devices, int nr_devices);
/* drivers/sh/superhyway/superhyway-sysfs.c */
@@ -70,3 +91,6 @@
#endif /* __LINUX_SUPERHYWAY_H */
+--
+2.13.0
+
diff --git a/sparc-vio-use-dev_groups-and-not-dev_attrs-for.patch b/sparc-vio-use-dev_groups-and-not-dev_attrs-for.patch
new file mode 100644
index 0000000000000..fa6804b158f75
--- /dev/null
+++ b/sparc-vio-use-dev_groups-and-not-dev_attrs-for.patch
@@ -0,0 +1,67 @@
+From 2573075e9869c37eebb8037cb28783afd34fcbd7 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 6 Jun 2017 14:27:08 +0200
+Subject: [PATCH 14/15] sparc: vio: use dev_groups and not dev_attrs for
+ bus_type
+
+The dev_attrs field has long been "depreciated" and is finally being
+removed, so move the driver to use the "correct" dev_groups field
+instead for struct bus_type.
+
+Cc: "David S. Miller" <davem@davemloft.net>
+Cc: <sparclinux@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/sparc/kernel/vio.c | 18 +++++++++++-------
+ 1 file changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c
+index f6bb857254fc..78bf2cc60924 100644
+--- a/arch/sparc/kernel/vio.c
++++ b/arch/sparc/kernel/vio.c
+@@ -105,6 +105,7 @@ static ssize_t devspec_show(struct device *dev,
+
+ return sprintf(buf, "%s\n", str);
+ }
++static DEVICE_ATTR_RO(devspec);
+
+ static ssize_t type_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+@@ -112,6 +113,7 @@ static ssize_t type_show(struct device *dev,
+ struct vio_dev *vdev = to_vio_dev(dev);
+ return sprintf(buf, "%s\n", vdev->type);
+ }
++static DEVICE_ATTR_RO(type);
+
+ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
+@@ -120,17 +122,19 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
+
+ return sprintf(buf, "vio:T%sS%s\n", vdev->type, vdev->compat);
+ }
++static DEVICE_ATTR_RO(modalias);
+
+-static struct device_attribute vio_dev_attrs[] = {
+- __ATTR_RO(devspec),
+- __ATTR_RO(type),
+- __ATTR_RO(modalias),
+- __ATTR_NULL
+-};
++static struct attribute *vio_dev_attrs[] = {
++ &dev_attr_devspec.attr,
++ &dev_attr_type.attr,
++ &dev_attr_modalias.attr,
++ NULL,
++ };
++ATTRIBUTE_GROUPS(vio_dev);
+
+ static struct bus_type vio_bus_type = {
+ .name = "vio",
+- .dev_attrs = vio_dev_attrs,
++ .dev_groups = vio_dev_groups,
+ .uevent = vio_hotplug,
+ .match = vio_bus_match,
+ .probe = vio_device_probe,
+--
+2.13.0
+