aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-14 13:59:04 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-14 13:59:04 +0200
commit5a7f345ba5e849229317f73497a17637c9a08e4a (patch)
tree4d7661b70e4da95d2acfddce1ba76b7b3190cd3f
parent1670862cd60c9110a93d8fdd186d4bfe51b185d1 (diff)
downloadpatches-5a7f345ba5e849229317f73497a17637c9a08e4a.tar.gz
get a bunch of stuff finally upstream.
-rw-r--r--amba-use-dev_groups-and-not-dev_attrs-for-bus_type.patch75
-rw-r--r--arm-ecard-use-dev_groups-and-not-dev_attrs-for.patch111
-rw-r--r--c03.patch40
-rw-r--r--c04.patch41
-rw-r--r--c05.patch58
-rw-r--r--c06.patch72
-rw-r--r--c07.patch53
-rw-r--r--c09.patch96
-rw-r--r--c99.patch91
-rw-r--r--d01.patch85
-rw-r--r--d02.patch243
-rw-r--r--d03.patch54
-rw-r--r--d04.patch44
-rw-r--r--d05.patch2
-rw-r--r--d06.patch74
-rw-r--r--d07.patch36
-rw-r--r--d08.patch75
-rw-r--r--d09.patch36
-rw-r--r--d10.patch216
-rw-r--r--d11.patch165
-rw-r--r--d12.patch47
-rw-r--r--d13.patch2
-rw-r--r--d15.patch32
-rw-r--r--driver-core-remove-class_attr-usage.patch65
-rw-r--r--driver-core-remove-struct-bus_type.dev_attrs.patch109
-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.patch99
-rw-r--r--mips-sgi-ip22-ecard-use-dev_groups-and-not-dev_attrs.patch70
-rw-r--r--parisc-parisc_bus_type-use-dev_groups-and-not.patch71
-rw-r--r--pci_groups.patch4
-rw-r--r--powerpc-ibmebus-use-dev_groups-and-not-dev_attrs-for.patch76
-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.patch106
-rw-r--r--rpmsg-use-dev_groups-and-not-dev_attrs-for-bus_type.patch69
-rw-r--r--series36
-rw-r--r--sh-superhyway-use-dev_groups-and-not-dev_attrs-for.patch96
-rw-r--r--sparc-vio-use-dev_groups-and-not-dev_attrs-for.patch67
-rw-r--r--tests-convert-the-membarrier-test-to-tap-format.patch160
40 files changed, 4 insertions, 2991 deletions
diff --git a/amba-use-dev_groups-and-not-dev_attrs-for-bus_type.patch b/amba-use-dev_groups-and-not-dev_attrs-for-bus_type.patch
deleted file mode 100644
index 0e0cc71e84cb52..00000000000000
--- a/amba-use-dev_groups-and-not-dev_attrs-for-bus_type.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-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 ++++++++++++-------------
- 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(struct device *_dev,
-
- return count;
- }
-+static DEVICE_ATTR_RW(driver_override);
-
- #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 *_dev, \
- { \
- struct amba_device *dev = to_amba_device(_dev); \
- return sprintf(buf, fmt, arg); \
--}
--
--#define amba_attr(name,fmt,arg...) \
--amba_attr_func(name,fmt,arg) \
--static DEVICE_ATTR(name, S_IRUGO, name##_show, NULL)
-+} \
-+static DEVICE_ATTR_RO(name)
-
- amba_attr_func(id, "%08x\n", dev->periphid);
--amba_attr(irq0, "%u\n", dev->irq[0]);
--amba_attr(irq1, "%u\n", dev->irq[1]);
-+amba_attr_func(irq0, "%u\n", dev->irq[0]);
-+amba_attr_func(irq1, "%u\n", dev->irq[1]);
- amba_attr_func(resource, "\t%016llx\t%016llx\t%016lx\n",
- (unsigned long long)dev->res.start, (unsigned long long)dev->res.end,
- dev->res.flags);
-
--static struct device_attribute amba_dev_attrs[] = {
-- __ATTR_RO(id),
-- __ATTR_RO(resource),
-- __ATTR_RW(driver_override),
-- __ATTR_NULL,
-+static struct attribute *amba_dev_attrs[] = {
-+ &dev_attr_id.attr,
-+ &dev_attr_resource.attr,
-+ &dev_attr_driver_override.attr,
-+ NULL,
- };
-+ATTRIBUTE_GROUPS(amba_dev);
-
- #ifdef CONFIG_PM
- /*
-@@ -192,7 +191,7 @@ static const struct dev_pm_ops amba_pm = {
- */
- struct bus_type amba_bustype = {
- .name = "amba",
-- .dev_attrs = amba_dev_attrs,
-+ .dev_groups = amba_dev_groups,
- .match = amba_match,
- .uevent = amba_uevent,
- .pm = &amba_pm,
---
-2.13.0
-
diff --git a/arm-ecard-use-dev_groups-and-not-dev_attrs-for.patch b/arm-ecard-use-dev_groups-and-not-dev_attrs-for.patch
deleted file mode 100644
index 1f5dea91cd8b39..00000000000000
--- a/arm-ecard-use-dev_groups-and-not-dev_attrs-for.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-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 | 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 ecard_alloc_card(int type, int slot)
- return ec;
- }
-
--static ssize_t ecard_show_irq(struct device *dev, struct device_attribute *attr, char *buf)
-+static ssize_t irq_show(struct device *dev, struct device_attribute *attr, char *buf)
- {
- struct expansion_card *ec = ECARD_DEV(dev);
- return sprintf(buf, "%u\n", ec->irq);
- }
-+static DEVICE_ATTR_RO(irq);
-
--static ssize_t ecard_show_dma(struct device *dev, struct device_attribute *attr, char *buf)
-+static ssize_t dma_show(struct device *dev, struct device_attribute *attr, char *buf)
- {
- struct expansion_card *ec = ECARD_DEV(dev);
- return sprintf(buf, "%u\n", ec->dma);
- }
-+static DEVICE_ATTR_RO(dma);
-
--static ssize_t ecard_show_resources(struct device *dev, struct device_attribute *attr, char *buf)
-+static ssize_t resource_show(struct device *dev, struct device_attribute *attr, char *buf)
- {
- struct expansion_card *ec = ECARD_DEV(dev);
- char *str = buf;
-@@ -787,35 +789,39 @@ static ssize_t ecard_show_resources(struct device *dev, struct device_attribute
-
- return str - buf;
- }
-+static DEVICE_ATTR_RO(resource_show)
-
--static ssize_t ecard_show_vendor(struct device *dev, struct device_attribute *attr, char *buf)
-+static ssize_t vendor_show(struct device *dev, struct device_attribute *attr, char *buf)
- {
- struct expansion_card *ec = ECARD_DEV(dev);
- return sprintf(buf, "%u\n", ec->cid.manufacturer);
- }
-+static DEVICE_ATTR_RO(vendor);
-
--static ssize_t ecard_show_device(struct device *dev, struct device_attribute *attr, char *buf)
-+static ssize_t device_show(struct device *dev, struct device_attribute *attr, char *buf)
- {
- struct expansion_card *ec = ECARD_DEV(dev);
- return sprintf(buf, "%u\n", ec->cid.product);
- }
-+static DEVICE_ATTR_RO(device);
-
--static ssize_t ecard_show_type(struct device *dev, struct device_attribute *attr, char *buf)
-+static ssize_t type_show(struct device *dev, struct device_attribute *attr, char *buf)
- {
- struct expansion_card *ec = ECARD_DEV(dev);
- return sprintf(buf, "%s\n", ec->easi ? "EASI" : "IOC");
- }
--
--static struct device_attribute ecard_dev_attrs[] = {
-- __ATTR(device, S_IRUGO, ecard_show_device, NULL),
-- __ATTR(dma, S_IRUGO, ecard_show_dma, NULL),
-- __ATTR(irq, S_IRUGO, ecard_show_irq, NULL),
-- __ATTR(resource, S_IRUGO, ecard_show_resources, NULL),
-- __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,
-+ &dev_attr_irq.attr,
-+ &dev_attr_resource.attr,
-+ &dev_attr_type.attr,
-+ &dev_attr_vendor.attr,
-+ NULL,
- };
--
-+ATTRIBUTE_GROUPS(ecard_dev);
-
- int ecard_request_resources(struct expansion_card *ec)
- {
-@@ -1120,7 +1126,7 @@ static int ecard_match(struct device *_dev, struct device_driver *_drv)
-
- struct bus_type ecard_bus_type = {
- .name = "ecard",
-- .dev_attrs = ecard_dev_attrs,
-+ .dev_groups = ecard_dev_groups,
- .match = ecard_match,
- .probe = ecard_drv_probe,
- .remove = ecard_drv_remove,
---
-2.13.0
-
diff --git a/c03.patch b/c03.patch
deleted file mode 100644
index b228b62ec56e6d..00000000000000
--- a/c03.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From foo@baz Tue Jun 6 14:47:15 CEST 2017
-Date: Tue, 06 Jun 2017 14:47:15 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: uwb: use class_groups instead of class_attrs
-
-The class_attrs pointer is long depreciated, and is about to be finally
-removed, so move to use the class_groups pointer instead.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/uwb/driver.c | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
---- a/drivers/uwb/driver.c
-+++ b/drivers/uwb/driver.c
-@@ -94,17 +94,18 @@ ssize_t beacon_timeout_ms_store(struct c
- beacon_timeout_ms = bt;
- return size;
- }
-+static CLASS_ATTR_RW(beacon_timeout_ms);
-
--static struct class_attribute uwb_class_attrs[] = {
-- __ATTR(beacon_timeout_ms, S_IWUSR | S_IRUGO,
-- beacon_timeout_ms_show, beacon_timeout_ms_store),
-- __ATTR_NULL,
-+static struct attribute *uwb_class_attrs[] = {
-+ &class_attr_beacon_timeout_ms.attr,
-+ NULL,
- };
-+ATTRIBUTE_GROUPS(uwb_class);
-
- /** Device model classes */
- struct class uwb_rc_class = {
- .name = "uwb_rc",
-- .class_attrs = uwb_class_attrs,
-+ .class_groups = uwb_class_groups,
- };
-
-
diff --git a/c04.patch b/c04.patch
deleted file mode 100644
index eed5634e699668..00000000000000
--- a/c04.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From foo@baz Tue Jun 6 14:48:05 CEST 2017
-Date: Tue, 06 Jun 2017 14:48:05 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: scsi: ibmvscsi_tgt: remove use of class_attrs
-
-The class_attrs pointer is going away and it's not even being used in
-this driver, so just remove it entirely.
-
-Cc: "Bryant G. Ly" <bryantly@linux.vnet.ibm.com>
-Cc: Michael Cyr <mikecyr@linux.vnet.ibm.com>
-Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
-Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
-Cc: <linux-scsi@vger.kernel.org>
-Cc: <target-devel@vger.kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 5 -----
- 1 file changed, 5 deletions(-)
-
---- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
-+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
-@@ -3934,10 +3934,6 @@ static const struct target_core_fabric_o
-
- static void ibmvscsis_dev_release(struct device *dev) {};
-
--static struct class_attribute ibmvscsis_class_attrs[] = {
-- __ATTR_NULL,
--};
--
- static struct device_attribute dev_attr_system_id =
- __ATTR(system_id, S_IRUGO, system_id_show, NULL);
-
-@@ -3957,7 +3953,6 @@ ATTRIBUTE_GROUPS(ibmvscsis_dev);
- static struct class ibmvscsis_class = {
- .name = "ibmvscsis",
- .dev_release = ibmvscsis_dev_release,
-- .class_attrs = ibmvscsis_class_attrs,
- .dev_groups = ibmvscsis_dev_groups,
- };
-
diff --git a/c05.patch b/c05.patch
deleted file mode 100644
index 3c26a6de03c4bb..00000000000000
--- a/c05.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From foo@baz Tue Jun 6 14:48:10 CEST 2017
-Date: Tue, 06 Jun 2017 14:48:10 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: mtd: use class_groups instead of class_attrs
-
-The class_attrs pointer is long depreciated, and is about to be finally
-removed, so move to use the class_groups pointer instead.
-
-Cc: Artem Bityutskiy <dedekind1@gmail.com>
-Cc: Richard Weinberger <richard@nod.at>
-Cc: David Woodhouse <dwmw2@infradead.org>
-Cc: Brian Norris <computersforpeace@gmail.com>
-Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
-Cc: Marek Vasut <marek.vasut@gmail.com>
-Cc: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
-Cc: <linux-mtd@lists.infradead.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/mtd/ubi/build.c | 16 +++++++++-------
- 1 file changed, 9 insertions(+), 7 deletions(-)
-
---- a/drivers/mtd/ubi/build.c
-+++ b/drivers/mtd/ubi/build.c
-@@ -104,23 +104,25 @@ DEFINE_MUTEX(ubi_devices_mutex);
- static DEFINE_SPINLOCK(ubi_devices_lock);
-
- /* "Show" method for files in '/<sysfs>/class/ubi/' */
--static ssize_t ubi_version_show(struct class *class,
-- struct class_attribute *attr, char *buf)
-+/* UBI version attribute ('/<sysfs>/class/ubi/version') */
-+static ssize_t version_show(struct class *class, struct class_attribute *attr,
-+ char *buf)
- {
- return sprintf(buf, "%d\n", UBI_VERSION);
- }
-+static CLASS_ATTR_RO(version);
-
--/* UBI version attribute ('/<sysfs>/class/ubi/version') */
--static struct class_attribute ubi_class_attrs[] = {
-- __ATTR(version, S_IRUGO, ubi_version_show, NULL),
-- __ATTR_NULL
-+static struct attributes *ubi_class_attrs[] = {
-+ &class_attr_version.attr,
-+ NULL,
- };
-+ATTRIBUTE_GROUPS(ubi_class);
-
- /* Root UBI "class" object (corresponds to '/<sysfs>/class/ubi/') */
- struct class ubi_class = {
- .name = UBI_NAME_STR,
- .owner = THIS_MODULE,
-- .class_attrs = ubi_class_attrs,
-+ .class_groups = ubi_class_groups,
- };
-
- static ssize_t dev_attribute_show(struct device *dev,
diff --git a/c06.patch b/c06.patch
deleted file mode 100644
index eaec8b09adb3b0..00000000000000
--- a/c06.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From foo@baz Tue Jun 6 14:48:17 CEST 2017
-Date: Tue, 06 Jun 2017 14:48:17 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: zram: use class_groups instead of class_attrs
-
-The class_attrs pointer is long depreciated, and is about to be finally
-removed, so move to use the class_groups pointer instead.
-
-Cc: Minchan Kim <minchan@kernel.org>
-Cc: Nitin Gupta <ngupta@vflare.org>
-Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/block/zram/zram_drv.c | 26 +++++++++++++++-----------
- 1 file changed, 15 insertions(+), 11 deletions(-)
-
---- a/drivers/block/zram/zram_drv.c
-+++ b/drivers/block/zram/zram_drv.c
-@@ -1272,6 +1272,13 @@ static int zram_remove(struct zram *zram
- }
-
- /* zram-control sysfs attributes */
-+
-+/*
-+ * NOTE: hot_add attribute is not the usual read-only sysfs attribute. In a
-+ * sense that reading from this file does alter the state of your system -- it
-+ * creates a new un-initialized zram device and returns back this device's
-+ * device_id (or an error code if it fails to create a new device).
-+ */
- static ssize_t hot_add_show(struct class *class,
- struct class_attribute *attr,
- char *buf)
-@@ -1286,6 +1293,7 @@ static ssize_t hot_add_show(struct class
- return ret;
- return scnprintf(buf, PAGE_SIZE, "%d\n", ret);
- }
-+static CLASS_ATTR(hot_add, 0400, hot_add_show, NULL);
-
- static ssize_t hot_remove_store(struct class *class,
- struct class_attribute *attr,
-@@ -1316,23 +1324,19 @@ static ssize_t hot_remove_store(struct c
- mutex_unlock(&zram_index_mutex);
- return ret ? ret : count;
- }
-+static CLASS_ATTR_WO(hot_remove);
-
--/*
-- * NOTE: hot_add attribute is not the usual read-only sysfs attribute. In a
-- * sense that reading from this file does alter the state of your system -- it
-- * creates a new un-initialized zram device and returns back this device's
-- * device_id (or an error code if it fails to create a new device).
-- */
--static struct class_attribute zram_control_class_attrs[] = {
-- __ATTR(hot_add, 0400, hot_add_show, NULL),
-- __ATTR_WO(hot_remove),
-- __ATTR_NULL,
-+static struct attribute *zram_control_class_attrs[] = {
-+ &class_attr_hot_add.attr,
-+ &class_attr_hot_remove.attr,
-+ NULL,
- };
-+ATTRIBUTE_GROUPS(zram_control_class);
-
- static struct class zram_control_class = {
- .name = "zram-control",
- .owner = THIS_MODULE,
-- .class_attrs = zram_control_class_attrs,
-+ .class_groups = zram_control_class_groups,
- };
-
- static int zram_remove_cb(int id, void *ptr, void *data)
diff --git a/c07.patch b/c07.patch
deleted file mode 100644
index 7f95a5aa87aaca..00000000000000
--- a/c07.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From foo@baz Tue Jun 6 14:48:22 CEST 2017
-Date: Tue, 06 Jun 2017 14:48:22 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: gpio: use class_groups instead of class_attrs
-
-The class_attrs pointer is long depreciated, and is about to be finally
-removed, so move to use the class_groups pointer instead.
-
-Cc: Linus Walleij <linus.walleij@linaro.org>
-Cc: Alexandre Courbot <gnurou@gmail.com>
-Cc: <linux-gpio@vger.kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/gpio/gpiolib-sysfs.c | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
---- a/drivers/gpio/gpiolib-sysfs.c
-+++ b/drivers/gpio/gpiolib-sysfs.c
-@@ -479,6 +479,7 @@ done:
- pr_debug("%s: status %d\n", __func__, status);
- return status ? : len;
- }
-+static CLASS_ATTR_WO(export);
-
- static ssize_t unexport_store(struct class *class,
- struct class_attribute *attr,
-@@ -514,18 +515,20 @@ done:
- pr_debug("%s: status %d\n", __func__, status);
- return status ? : len;
- }
-+static CLASS_ATTR_WO(unexport);
-
--static struct class_attribute gpio_class_attrs[] = {
-- __ATTR(export, 0200, NULL, export_store),
-- __ATTR(unexport, 0200, NULL, unexport_store),
-- __ATTR_NULL,
-+static struct attribute *gpio_class_attrs[] = {
-+ &class_attr_export.attr,
-+ &class_attr_unexport.attr,
-+ NULL,
- };
-+ATTRIBUTE_GROUPS(gpio_class);
-
- static struct class gpio_class = {
- .name = "gpio",
- .owner = THIS_MODULE,
-
-- .class_attrs = gpio_class_attrs,
-+ .class_groups = gpio_class_groups,
- };
-
-
diff --git a/c09.patch b/c09.patch
deleted file mode 100644
index fddbb2df18e919..00000000000000
--- a/c09.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From foo@baz Tue Jun 6 14:48:27 CEST 2017
-Date: Tue, 06 Jun 2017 14:48:27 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: pktcdvd: use class_groups instead of class_attrs
-
-The class_attrs pointer is long depreciated, and is about to be finally
-removed, so move to use the class_groups pointer instead.
-
-Cc: <linux-block@vger.kernel.org>
-Cc: Jens Axboe <axboe@fb.com>
-Cc: Hannes Reinecke <hare@suse.com>
-Cc: Jan Kara <jack@suse.cz>
-Cc: Mike Christie <mchristi@redhat.com>
-Cc: Bart Van Assche <Bart.VanAssche@sandisk.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/block/pktcdvd.c | 35 +++++++++++++++++------------------
- 1 file changed, 17 insertions(+), 18 deletions(-)
-
---- a/drivers/block/pktcdvd.c
-+++ b/drivers/block/pktcdvd.c
-@@ -348,9 +348,9 @@ static void class_pktcdvd_release(struct
- {
- kfree(cls);
- }
--static ssize_t class_pktcdvd_show_map(struct class *c,
-- struct class_attribute *attr,
-- char *data)
-+
-+static ssize_t device_map_show(struct class *c, struct class_attribute *attr,
-+ char *data)
- {
- int n = 0;
- int idx;
-@@ -368,11 +368,10 @@ static ssize_t class_pktcdvd_show_map(st
- mutex_unlock(&ctl_mutex);
- return n;
- }
-+static CLASS_ATTR_RO(device_map);
-
--static ssize_t class_pktcdvd_store_add(struct class *c,
-- struct class_attribute *attr,
-- const char *buf,
-- size_t count)
-+static ssize_t add_store(struct class *c, struct class_attribute *attr,
-+ const char *buf, size_t count)
- {
- unsigned int major, minor;
-
-@@ -390,11 +389,10 @@ static ssize_t class_pktcdvd_store_add(s
-
- return -EINVAL;
- }
-+static CLASS_ATTR_WO(add);
-
--static ssize_t class_pktcdvd_store_remove(struct class *c,
-- struct class_attribute *attr,
-- const char *buf,
-- size_t count)
-+static ssize_t remove_store(struct class *c, struct class_attribute *attr,
-+ const char *buf, size_t count)
- {
- unsigned int major, minor;
- if (sscanf(buf, "%u:%u", &major, &minor) == 2) {
-@@ -403,14 +401,15 @@ static ssize_t class_pktcdvd_store_remov
- }
- return -EINVAL;
- }
-+static CLASS_ATTR_WO(remove);
-
--static struct class_attribute class_pktcdvd_attrs[] = {
-- __ATTR(add, 0200, NULL, class_pktcdvd_store_add),
-- __ATTR(remove, 0200, NULL, class_pktcdvd_store_remove),
-- __ATTR(device_map, 0444, class_pktcdvd_show_map, NULL),
-- __ATTR_NULL
-+static struct attribute *class_pktcdvd_attrs[] = {
-+ &class_attr_add.attr,
-+ &class_attr_remove.attr,
-+ &class_attr_device_map.attr,
-+ NULL,
- };
--
-+ATTRIBUTE_GROUPS(class_pktcdvd);
-
- static int pkt_sysfs_init(void)
- {
-@@ -426,7 +425,7 @@ static int pkt_sysfs_init(void)
- class_pktcdvd->name = DRIVER_NAME;
- class_pktcdvd->owner = THIS_MODULE;
- class_pktcdvd->class_release = class_pktcdvd_release;
-- class_pktcdvd->class_attrs = class_pktcdvd_attrs;
-+ class_pktcdvd->class_groups = class_pktcdvd_groups;
- ret = class_register(class_pktcdvd);
- if (ret) {
- kfree(class_pktcdvd);
diff --git a/c99.patch b/c99.patch
deleted file mode 100644
index bd9f85d988c340..00000000000000
--- a/c99.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From foo@baz Wed Nov 23 11:18:27 CET 2016
-Date: Wed, 23 Nov 2016 11:18:27 +0100
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: driver core: remove class_attrs from struct class
-
-This field is no longer used or needed (use class_groups instead), so it
-can be removed along with the driver core functionality that created and
-removed these files.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/base/class.c | 33 ---------------------------------
- include/linux/device.h | 2 --
- 2 files changed, 35 deletions(-)
-
---- a/drivers/base/class.c
-+++ b/drivers/base/class.c
-@@ -119,36 +119,6 @@ static void class_put(struct class *cls)
- kset_put(&cls->p->subsys);
- }
-
--static int add_class_attrs(struct class *cls)
--{
-- int i;
-- int error = 0;
--
-- if (cls->class_attrs) {
-- for (i = 0; cls->class_attrs[i].attr.name; i++) {
-- error = class_create_file(cls, &cls->class_attrs[i]);
-- if (error)
-- goto error;
-- }
-- }
--done:
-- return error;
--error:
-- while (--i >= 0)
-- class_remove_file(cls, &cls->class_attrs[i]);
-- goto done;
--}
--
--static void remove_class_attrs(struct class *cls)
--{
-- int i;
--
-- if (cls->class_attrs) {
-- for (i = 0; cls->class_attrs[i].attr.name; i++)
-- class_remove_file(cls, &cls->class_attrs[i]);
-- }
--}
--
- static void klist_class_dev_get(struct klist_node *n)
- {
- struct device *dev = container_of(n, struct device, knode_class);
-@@ -217,8 +187,6 @@ int __class_register(struct class *cls,
- }
- error = class_add_groups(class_get(cls), cls->class_groups);
- class_put(cls);
-- error = add_class_attrs(class_get(cls));
-- class_put(cls);
- return error;
- }
- EXPORT_SYMBOL_GPL(__class_register);
-@@ -226,7 +194,6 @@ EXPORT_SYMBOL_GPL(__class_register);
- void class_unregister(struct class *cls)
- {
- pr_debug("device class '%s': unregistering\n", cls->name);
-- remove_class_attrs(cls);
- class_remove_groups(cls, cls->class_groups);
- kset_unregister(&cls->p->subsys);
- }
---- a/include/linux/device.h
-+++ b/include/linux/device.h
-@@ -363,7 +363,6 @@ int subsys_virtual_register(struct bus_t
- * struct class - device classes
- * @name: Name of the class.
- * @owner: The module owner.
-- * @class_attrs: Default attributes of this class.
- * @class_groups: Default attributes of this class.
- * @dev_groups: Default attributes of the devices that belong to the class.
- * @dev_kobj: The kobject that represents this class and links it into the hierarchy.
-@@ -392,7 +391,6 @@ struct class {
- const char *name;
- struct module *owner;
-
-- struct class_attribute *class_attrs;
- const struct attribute_group **class_groups;
- const struct attribute_group **dev_groups;
- struct kobject *dev_kobj;
diff --git a/d01.patch b/d01.patch
deleted file mode 100644
index 28c854b364b73f..00000000000000
--- a/d01.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From foo@baz Thu Jun 8 15:02:37 CEST 2017
-Date: Thu, 08 Jun 2017 15:02:37 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: HID: hid-core: convert to use DRIVER_ATTR_RO and drv_groups
-
-In the quest to get rid of DRIVER_ATTR(), this patch converts the
-hid-core code to use DRIVER_ATTR_RO() and also moves to use drv_groups
-as creating individual sysfs files is not good (it races with userspace
-notifications.)
-
-Cc: Jiri Kosina <jikos@kernel.org>
-Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
-Cc: <linux-input@vger.kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/hid/hid-core.c | 24 ++++++++++--------------
- 1 file changed, 10 insertions(+), 14 deletions(-)
-
---- a/drivers/hid/hid-core.c
-+++ b/drivers/hid/hid-core.c
-@@ -2147,7 +2147,7 @@ struct hid_dynid {
- * Adds a new dynamic hid device ID to this driver,
- * and causes the driver to probe for all devices again.
- */
--static ssize_t store_new_id(struct device_driver *drv, const char *buf,
-+static ssize_t new_id_store(struct device_driver *drv, const char *buf,
- size_t count)
- {
- struct hid_driver *hdrv = to_hid_driver(drv);
-@@ -2179,7 +2179,13 @@ static ssize_t store_new_id(struct devic
-
- return ret ? : count;
- }
--static DRIVER_ATTR(new_id, S_IWUSR, NULL, store_new_id);
-+static DRIVER_ATTR_WO(new_id);
-+
-+static struct attribute *hid_drv_attrs[] = {
-+ &driver_attr_new_id.attr,
-+ NULL,
-+};
-+ATTRIBUTE_GROUPS(hid_drv);
-
- static void hid_free_dynids(struct hid_driver *hdrv)
- {
-@@ -2343,6 +2349,7 @@ static int hid_uevent(struct device *dev
- static struct bus_type hid_bus_type = {
- .name = "hid",
- .dev_groups = hid_dev_groups,
-+ .drv_groups = hid_drv_groups,
- .match = hid_bus_match,
- .probe = hid_device_probe,
- .remove = hid_device_remove,
-@@ -2782,8 +2789,6 @@ EXPORT_SYMBOL_GPL(hid_destroy_device);
- int __hid_register_driver(struct hid_driver *hdrv, struct module *owner,
- const char *mod_name)
- {
-- int ret;
--
- hdrv->driver.name = hdrv->name;
- hdrv->driver.bus = &hid_bus_type;
- hdrv->driver.owner = owner;
-@@ -2792,21 +2797,12 @@ int __hid_register_driver(struct hid_dri
- INIT_LIST_HEAD(&hdrv->dyn_list);
- spin_lock_init(&hdrv->dyn_lock);
-
-- ret = driver_register(&hdrv->driver);
-- if (ret)
-- return ret;
--
-- ret = driver_create_file(&hdrv->driver, &driver_attr_new_id);
-- if (ret)
-- driver_unregister(&hdrv->driver);
--
-- return ret;
-+ return driver_register(&hdrv->driver);
- }
- EXPORT_SYMBOL_GPL(__hid_register_driver);
-
- void hid_unregister_driver(struct hid_driver *hdrv)
- {
-- driver_remove_file(&hdrv->driver, &driver_attr_new_id);
- driver_unregister(&hdrv->driver);
- hid_free_dynids(hdrv);
- }
diff --git a/d02.patch b/d02.patch
deleted file mode 100644
index 528bcdf5de40b4..00000000000000
--- a/d02.patch
+++ /dev/null
@@ -1,243 +0,0 @@
-From foo@baz Thu Jun 8 15:02:46 CEST 2017
-Date: Thu, 08 Jun 2017 15:02:46 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: IB: nes: convert to use DRIVER_ATTR_RW
-
-We are trying to get rid of DRIVER_ATTR(), and all of the nes.c driver
-attributes can be trivially changed to use DRIVER_ATTR_RW(), making the
-code smaller and easier to manage over time.
-
-Cc: Faisal Latif <faisal.latif@intel.com>
-Cc: Doug Ledford <dledford@redhat.com>
-Cc: Sean Hefty <sean.hefty@intel.com>
-Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
-Cc: <linux-rdma@vger.kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/infiniband/hw/nes/nes.c | 80 +++++++++++++++-------------------------
- 1 file changed, 31 insertions(+), 49 deletions(-)
-
---- a/drivers/infiniband/hw/nes/nes.c
-+++ b/drivers/infiniband/hw/nes/nes.c
-@@ -815,7 +815,7 @@ static struct pci_driver nes_pci_driver
- .remove = nes_remove,
- };
-
--static ssize_t nes_show_adapter(struct device_driver *ddp, char *buf)
-+static ssize_t adapter_show(struct device_driver *ddp, char *buf)
- {
- unsigned int devfn = 0xffffffff;
- unsigned char bus_number = 0xff;
-@@ -834,7 +834,7 @@ static ssize_t nes_show_adapter(struct d
- return snprintf(buf, PAGE_SIZE, "%x:%x\n", bus_number, devfn);
- }
-
--static ssize_t nes_store_adapter(struct device_driver *ddp,
-+static ssize_t adapter_store(struct device_driver *ddp,
- const char *buf, size_t count)
- {
- char *p = (char *)buf;
-@@ -843,7 +843,7 @@ static ssize_t nes_store_adapter(struct
- return strnlen(buf, count);
- }
-
--static ssize_t nes_show_ee_cmd(struct device_driver *ddp, char *buf)
-+static ssize_t eeprom_cmd_show(struct device_driver *ddp, char *buf)
- {
- u32 eeprom_cmd = 0xdead;
- u32 i = 0;
-@@ -859,7 +859,7 @@ static ssize_t nes_show_ee_cmd(struct de
- return snprintf(buf, PAGE_SIZE, "0x%x\n", eeprom_cmd);
- }
-
--static ssize_t nes_store_ee_cmd(struct device_driver *ddp,
-+static ssize_t eeprom_cmd_store(struct device_driver *ddp,
- const char *buf, size_t count)
- {
- char *p = (char *)buf;
-@@ -880,7 +880,7 @@ static ssize_t nes_store_ee_cmd(struct d
- return strnlen(buf, count);
- }
-
--static ssize_t nes_show_ee_data(struct device_driver *ddp, char *buf)
-+static ssize_t eeprom_data_show(struct device_driver *ddp, char *buf)
- {
- u32 eeprom_data = 0xdead;
- u32 i = 0;
-@@ -897,7 +897,7 @@ static ssize_t nes_show_ee_data(struct d
- return snprintf(buf, PAGE_SIZE, "0x%x\n", eeprom_data);
- }
-
--static ssize_t nes_store_ee_data(struct device_driver *ddp,
-+static ssize_t eeprom_data_store(struct device_driver *ddp,
- const char *buf, size_t count)
- {
- char *p = (char *)buf;
-@@ -918,7 +918,7 @@ static ssize_t nes_store_ee_data(struct
- return strnlen(buf, count);
- }
-
--static ssize_t nes_show_flash_cmd(struct device_driver *ddp, char *buf)
-+static ssize_t flash_cmd_show(struct device_driver *ddp, char *buf)
- {
- u32 flash_cmd = 0xdead;
- u32 i = 0;
-@@ -935,7 +935,7 @@ static ssize_t nes_show_flash_cmd(struct
- return snprintf(buf, PAGE_SIZE, "0x%x\n", flash_cmd);
- }
-
--static ssize_t nes_store_flash_cmd(struct device_driver *ddp,
-+static ssize_t flash_cmd_store(struct device_driver *ddp,
- const char *buf, size_t count)
- {
- char *p = (char *)buf;
-@@ -956,7 +956,7 @@ static ssize_t nes_store_flash_cmd(struc
- return strnlen(buf, count);
- }
-
--static ssize_t nes_show_flash_data(struct device_driver *ddp, char *buf)
-+static ssize_t flash_data_show(struct device_driver *ddp, char *buf)
- {
- u32 flash_data = 0xdead;
- u32 i = 0;
-@@ -973,7 +973,7 @@ static ssize_t nes_show_flash_data(struc
- return snprintf(buf, PAGE_SIZE, "0x%x\n", flash_data);
- }
-
--static ssize_t nes_store_flash_data(struct device_driver *ddp,
-+static ssize_t flash_data_store(struct device_driver *ddp,
- const char *buf, size_t count)
- {
- char *p = (char *)buf;
-@@ -994,12 +994,12 @@ static ssize_t nes_store_flash_data(stru
- return strnlen(buf, count);
- }
-
--static ssize_t nes_show_nonidx_addr(struct device_driver *ddp, char *buf)
-+static ssize_t nonidx_addr_show(struct device_driver *ddp, char *buf)
- {
- return snprintf(buf, PAGE_SIZE, "0x%x\n", sysfs_nonidx_addr);
- }
-
--static ssize_t nes_store_nonidx_addr(struct device_driver *ddp,
-+static ssize_t nonidx_addr_store(struct device_driver *ddp,
- const char *buf, size_t count)
- {
- char *p = (char *)buf;
-@@ -1010,7 +1010,7 @@ static ssize_t nes_store_nonidx_addr(str
- return strnlen(buf, count);
- }
-
--static ssize_t nes_show_nonidx_data(struct device_driver *ddp, char *buf)
-+static ssize_t nonidx_data_show(struct device_driver *ddp, char *buf)
- {
- u32 nonidx_data = 0xdead;
- u32 i = 0;
-@@ -1027,7 +1027,7 @@ static ssize_t nes_show_nonidx_data(stru
- return snprintf(buf, PAGE_SIZE, "0x%x\n", nonidx_data);
- }
-
--static ssize_t nes_store_nonidx_data(struct device_driver *ddp,
-+static ssize_t nonidx_data_store(struct device_driver *ddp,
- const char *buf, size_t count)
- {
- char *p = (char *)buf;
-@@ -1048,12 +1048,12 @@ static ssize_t nes_store_nonidx_data(str
- return strnlen(buf, count);
- }
-
--static ssize_t nes_show_idx_addr(struct device_driver *ddp, char *buf)
-+static ssize_t idx_addr_show(struct device_driver *ddp, char *buf)
- {
- return snprintf(buf, PAGE_SIZE, "0x%x\n", sysfs_idx_addr);
- }
-
--static ssize_t nes_store_idx_addr(struct device_driver *ddp,
-+static ssize_t idx_addr_store(struct device_driver *ddp,
- const char *buf, size_t count)
- {
- char *p = (char *)buf;
-@@ -1064,7 +1064,7 @@ static ssize_t nes_store_idx_addr(struct
- return strnlen(buf, count);
- }
-
--static ssize_t nes_show_idx_data(struct device_driver *ddp, char *buf)
-+static ssize_t idx_data_show(struct device_driver *ddp, char *buf)
- {
- u32 idx_data = 0xdead;
- u32 i = 0;
-@@ -1081,7 +1081,7 @@ static ssize_t nes_show_idx_data(struct
- return snprintf(buf, PAGE_SIZE, "0x%x\n", idx_data);
- }
-
--static ssize_t nes_store_idx_data(struct device_driver *ddp,
-+static ssize_t idx_data_store(struct device_driver *ddp,
- const char *buf, size_t count)
- {
- char *p = (char *)buf;
-@@ -1102,11 +1102,7 @@ static ssize_t nes_store_idx_data(struct
- return strnlen(buf, count);
- }
-
--
--/**
-- * nes_show_wqm_quanta
-- */
--static ssize_t nes_show_wqm_quanta(struct device_driver *ddp, char *buf)
-+static ssize_t wqm_quanta_show(struct device_driver *ddp, char *buf)
- {
- u32 wqm_quanta_value = 0xdead;
- u32 i = 0;
-@@ -1123,12 +1119,8 @@ static ssize_t nes_show_wqm_quanta(struc
- return snprintf(buf, PAGE_SIZE, "0x%X\n", wqm_quanta_value);
- }
-
--
--/**
-- * nes_store_wqm_quanta
-- */
--static ssize_t nes_store_wqm_quanta(struct device_driver *ddp,
-- const char *buf, size_t count)
-+static ssize_t wqm_quanta_store(struct device_driver *ddp, const char *buf,
-+ size_t count)
- {
- unsigned long wqm_quanta_value;
- u32 wqm_config1;
-@@ -1153,26 +1145,16 @@ static ssize_t nes_store_wqm_quanta(stru
- return strnlen(buf, count);
- }
-
--static DRIVER_ATTR(adapter, S_IRUSR | S_IWUSR,
-- nes_show_adapter, nes_store_adapter);
--static DRIVER_ATTR(eeprom_cmd, S_IRUSR | S_IWUSR,
-- nes_show_ee_cmd, nes_store_ee_cmd);
--static DRIVER_ATTR(eeprom_data, S_IRUSR | S_IWUSR,
-- nes_show_ee_data, nes_store_ee_data);
--static DRIVER_ATTR(flash_cmd, S_IRUSR | S_IWUSR,
-- nes_show_flash_cmd, nes_store_flash_cmd);
--static DRIVER_ATTR(flash_data, S_IRUSR | S_IWUSR,
-- nes_show_flash_data, nes_store_flash_data);
--static DRIVER_ATTR(nonidx_addr, S_IRUSR | S_IWUSR,
-- nes_show_nonidx_addr, nes_store_nonidx_addr);
--static DRIVER_ATTR(nonidx_data, S_IRUSR | S_IWUSR,
-- nes_show_nonidx_data, nes_store_nonidx_data);
--static DRIVER_ATTR(idx_addr, S_IRUSR | S_IWUSR,
-- nes_show_idx_addr, nes_store_idx_addr);
--static DRIVER_ATTR(idx_data, S_IRUSR | S_IWUSR,
-- nes_show_idx_data, nes_store_idx_data);
--static DRIVER_ATTR(wqm_quanta, S_IRUSR | S_IWUSR,
-- nes_show_wqm_quanta, nes_store_wqm_quanta);
-+static DRIVER_ATTR_RW(adapter);
-+static DRIVER_ATTR_RW(eeprom_cmd);
-+static DRIVER_ATTR_RW(eeprom_data);
-+static DRIVER_ATTR_RW(flash_cmd);
-+static DRIVER_ATTR_RW(flash_data);
-+static DRIVER_ATTR_RW(nonidx_addr);
-+static DRIVER_ATTR_RW(nonidx_data);
-+static DRIVER_ATTR_RW(idx_addr);
-+static DRIVER_ATTR_RW(idx_data);
-+static DRIVER_ATTR_RW(wqm_quanta);
-
- static int nes_create_driver_sysfs(struct pci_driver *drv)
- {
diff --git a/d03.patch b/d03.patch
deleted file mode 100644
index 481044ca9606d9..00000000000000
--- a/d03.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From foo@baz Thu Jun 8 15:02:52 CEST 2017
-Date: Thu, 08 Jun 2017 15:02:52 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: PCI: pci-driver: convert to use DRIVER_ATTR_WO
-
-We are trying to get rid of DRIVER_ATTR(), and all of the pci-driver
-core driver attributes can be trivially changed to use DRIVER_ATTR_WO().
-
-Cc: Bjorn Helgaas <bhelgaas@google.com>
-Cc: <linux-pci@vger.kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/pci/pci-driver.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
---- a/drivers/pci/pci-driver.c
-+++ b/drivers/pci/pci-driver.c
-@@ -96,7 +96,7 @@ static void pci_free_dynids(struct pci_d
- *
- * Allow PCI IDs to be added to an existing driver via sysfs.
- */
--static ssize_t store_new_id(struct device_driver *driver, const char *buf,
-+static ssize_t new_id_store(struct device_driver *driver, const char *buf,
- size_t count)
- {
- struct pci_driver *pdrv = to_pci_driver(driver);
-@@ -154,7 +154,7 @@ static ssize_t store_new_id(struct devic
- return retval;
- return count;
- }
--static DRIVER_ATTR(new_id, S_IWUSR, NULL, store_new_id);
-+static DRIVER_ATTR_WO(new_id);
-
- /**
- * store_remove_id - remove a PCI device ID from this driver
-@@ -164,7 +164,7 @@ static DRIVER_ATTR(new_id, S_IWUSR, NULL
- *
- * Removes a dynamic pci device ID to this driver.
- */
--static ssize_t store_remove_id(struct device_driver *driver, const char *buf,
-+static ssize_t remove_id_store(struct device_driver *driver, const char *buf,
- size_t count)
- {
- struct pci_dynid *dynid, *n;
-@@ -198,7 +198,7 @@ static ssize_t store_remove_id(struct de
-
- return retval;
- }
--static DRIVER_ATTR(remove_id, S_IWUSR, NULL, store_remove_id);
-+static DRIVER_ATTR_WO(remove_id);
-
- static struct attribute *pci_drv_attrs[] = {
- &driver_attr_new_id.attr,
diff --git a/d04.patch b/d04.patch
deleted file mode 100644
index 771266f5c58e0d..00000000000000
--- a/d04.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From foo@baz Thu Jun 8 15:02:58 CEST 2017
-Date: Thu, 08 Jun 2017 15:02:58 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: TTY: hvc: convert to use DRIVER_ATTR_RW
-
-We are trying to get rid of DRIVER_ATTR(), and the hvc driver's
-attribute can be trivially changed to use DRIVER_ATTR_RW().
-
-Cc: Jiri Slaby <jslaby@suse.com>
-Cc: <linuxppc-dev@lists.ozlabs.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/tty/hvc/hvcs.c | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
---- a/drivers/tty/hvc/hvcs.c
-+++ b/drivers/tty/hvc/hvcs.c
-@@ -484,13 +484,13 @@ static struct attribute_group hvcs_attr_
- .attrs = hvcs_attrs,
- };
-
--static ssize_t hvcs_rescan_show(struct device_driver *ddp, char *buf)
-+static ssize_t rescan_show(struct device_driver *ddp, char *buf)
- {
- /* A 1 means it is updating, a 0 means it is done updating */
- return snprintf(buf, PAGE_SIZE, "%d\n", hvcs_rescan_status);
- }
-
--static ssize_t hvcs_rescan_store(struct device_driver *ddp, const char * buf,
-+static ssize_t rescan_store(struct device_driver *ddp, const char * buf,
- size_t count)
- {
- if ((simple_strtol(buf, NULL, 0) != 1)
-@@ -505,8 +505,7 @@ static ssize_t hvcs_rescan_store(struct
- return count;
- }
-
--static DRIVER_ATTR(rescan,
-- S_IRUGO | S_IWUSR, hvcs_rescan_show, hvcs_rescan_store);
-+static DRIVER_ATTR_RW(rescan);
-
- static void hvcs_kick(void)
- {
diff --git a/d05.patch b/d05.patch
index 91272bdc26a494..72f006fb5a7e15 100644
--- a/d05.patch
+++ b/d05.patch
@@ -101,7 +101,7 @@ Subject:
{
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
-@@ -5668,12 +5668,12 @@ static struct osst_support_data support_
+@@ -5667,12 +5667,12 @@ static struct osst_support_data support_
* sysfs support for osst driver parameter information
*/
diff --git a/d06.patch b/d06.patch
deleted file mode 100644
index e5e20f25eae03e..00000000000000
--- a/d06.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From foo@baz Thu Jun 8 15:03:13 CEST 2017
-Date: Thu, 08 Jun 2017 15:03:13 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: net: caif: convert to use DRIVER_ATTR_RO
-
-We are trying to get rid of DRIVER_ATTR(), and the caif driver's
-attributes can be trivially changed to use DRIVER_ATTR_RO().
-
-Cc: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
-Cc: <netdev@vger.kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/net/caif/caif_spi.c | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
---- a/drivers/net/caif/caif_spi.c
-+++ b/drivers/net/caif/caif_spi.c
-@@ -289,44 +289,44 @@ static LIST_HEAD(cfspi_list);
- static spinlock_t cfspi_list_lock;
-
- /* SPI uplink head alignment. */
--static ssize_t show_up_head_align(struct device_driver *driver, char *buf)
-+static ssize_t up_head_align_show(struct device_driver *driver, char *buf)
- {
- return sprintf(buf, "%d\n", spi_up_head_align);
- }
-
--static DRIVER_ATTR(up_head_align, S_IRUSR, show_up_head_align, NULL);
-+static DRIVER_ATTR_RO(up_head_align);
-
- /* SPI uplink tail alignment. */
--static ssize_t show_up_tail_align(struct device_driver *driver, char *buf)
-+static ssize_t up_tail_align_show(struct device_driver *driver, char *buf)
- {
- return sprintf(buf, "%d\n", spi_up_tail_align);
- }
-
--static DRIVER_ATTR(up_tail_align, S_IRUSR, show_up_tail_align, NULL);
-+static DRIVER_ATTR_RO(up_tail_align);
-
- /* SPI downlink head alignment. */
--static ssize_t show_down_head_align(struct device_driver *driver, char *buf)
-+static ssize_t down_head_align_show(struct device_driver *driver, char *buf)
- {
- return sprintf(buf, "%d\n", spi_down_head_align);
- }
-
--static DRIVER_ATTR(down_head_align, S_IRUSR, show_down_head_align, NULL);
-+static DRIVER_ATTR_RO(down_head_align);
-
- /* SPI downlink tail alignment. */
--static ssize_t show_down_tail_align(struct device_driver *driver, char *buf)
-+static ssize_t down_tail_align_show(struct device_driver *driver, char *buf)
- {
- return sprintf(buf, "%d\n", spi_down_tail_align);
- }
-
--static DRIVER_ATTR(down_tail_align, S_IRUSR, show_down_tail_align, NULL);
-+static DRIVER_ATTR_RO(down_tail_align);
-
- /* SPI frame alignment. */
--static ssize_t show_frame_align(struct device_driver *driver, char *buf)
-+static ssize_t frame_align_show(struct device_driver *driver, char *buf)
- {
- return sprintf(buf, "%d\n", spi_frm_align);
- }
-
--static DRIVER_ATTR(frame_align, S_IRUSR, show_frame_align, NULL);
-+static DRIVER_ATTR_RO(frame_align);
-
- int cfspi_xmitfrm(struct cfspi *cfspi, u8 *buf, size_t len)
- {
diff --git a/d07.patch b/d07.patch
deleted file mode 100644
index 2e8b3d0acef337..00000000000000
--- a/d07.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From foo@baz Thu Jun 8 15:03:19 CEST 2017
-Date: Thu, 08 Jun 2017 15:03:19 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: net: ehea: convert to use DRIVER_ATTR_RO
-
-We are trying to get rid of DRIVER_ATTR(), and the ehea driver's
-attribute can be trivially changed to use DRIVER_ATTR_RO().
-
-Cc: Douglas Miller <dougmill@linux.vnet.ibm.com>
-Cc: <netdev@vger.kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/net/ethernet/ibm/ehea/ehea_main.c | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
---- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
-+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
-@@ -3553,14 +3553,12 @@ static int check_module_parm(void)
- return ret;
- }
-
--static ssize_t ehea_show_capabilities(struct device_driver *drv,
-- char *buf)
-+static ssize_t capabilities_show(struct device_driver *drv, char *buf)
- {
- return sprintf(buf, "%d", EHEA_CAPABILITIES);
- }
-
--static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH,
-- ehea_show_capabilities, NULL);
-+static DRIVER_ATTR_RO(capabilities);
-
- static int __init ehea_module_init(void)
- {
diff --git a/d08.patch b/d08.patch
deleted file mode 100644
index 2f3a3065268a20..00000000000000
--- a/d08.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From foo@baz Thu Jun 8 15:03:24 CEST 2017
-Date: Thu, 08 Jun 2017 15:03:24 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: wireless: ipw2x00: convert to use DRIVER_ATTR_RW
-
-We are trying to get rid of DRIVER_ATTR(), and the ipw2x00 driver's
-attributes can be trivially changed to use DRIVER_ATTR_RW().
-
-Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
-Cc: Kalle Valo <kvalo@codeaurora.org>
-Cc: <linux-wireless@vger.kernel.org>
-Cc: <netdev@vger.kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 8 +++-----
- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 8 +++-----
- 2 files changed, 6 insertions(+), 10 deletions(-)
-
---- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
-+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
-@@ -4160,12 +4160,12 @@ static ssize_t show_bssinfo(struct devic
- static DEVICE_ATTR(bssinfo, S_IRUGO, show_bssinfo, NULL);
-
- #ifdef CONFIG_IPW2100_DEBUG
--static ssize_t show_debug_level(struct device_driver *d, char *buf)
-+static ssize_t debug_level_show(struct device_driver *d, char *buf)
- {
- return sprintf(buf, "0x%08X\n", ipw2100_debug_level);
- }
-
--static ssize_t store_debug_level(struct device_driver *d,
-+static ssize_t debug_level_store(struct device_driver *d,
- const char *buf, size_t count)
- {
- u32 val;
-@@ -4179,9 +4179,7 @@ static ssize_t store_debug_level(struct
-
- return strnlen(buf, count);
- }
--
--static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO, show_debug_level,
-- store_debug_level);
-+static DRIVER_ATTR_RW(debug_level);
- #endif /* CONFIG_IPW2100_DEBUG */
-
- static ssize_t show_fatal_error(struct device *d,
---- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
-+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
-@@ -1195,12 +1195,12 @@ static void ipw_led_shutdown(struct ipw_
- *
- * See the level definitions in ipw for details.
- */
--static ssize_t show_debug_level(struct device_driver *d, char *buf)
-+static ssize_t debug_level_show(struct device_driver *d, char *buf)
- {
- return sprintf(buf, "0x%08X\n", ipw_debug_level);
- }
-
--static ssize_t store_debug_level(struct device_driver *d, const char *buf,
-+static ssize_t debug_level_store(struct device_driver *d, const char *buf,
- size_t count)
- {
- char *p = (char *)buf;
-@@ -1221,9 +1221,7 @@ static ssize_t store_debug_level(struct
-
- return strnlen(buf, count);
- }
--
--static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO,
-- show_debug_level, store_debug_level);
-+static DRIVER_ATTR_RW(debug_level);
-
- static inline u32 ipw_get_event_log_len(struct ipw_priv *priv)
- {
diff --git a/d09.patch b/d09.patch
deleted file mode 100644
index 48fdbff790e66e..00000000000000
--- a/d09.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From foo@baz Thu Jun 8 15:03:31 CEST 2017
-Date: Thu, 08 Jun 2017 15:03:31 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: pcmcia: ds: convert to use DRIVER_ATTR_RO
-
-We are trying to get rid of DRIVER_ATTR(), and the pcmcia driver's
-attribute can be trivially changed to use DRIVER_ATTR_RO().
-
-Cc: Russell King <rmk+kernel@armlinux.org.uk>
-Cc: <linux-pcmcia@lists.infradead.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/pcmcia/ds.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/pcmcia/ds.c
-+++ b/drivers/pcmcia/ds.c
-@@ -95,7 +95,7 @@ struct pcmcia_dynid {
- * and causes the driver to probe for all devices again.
- */
- static ssize_t
--pcmcia_store_new_id(struct device_driver *driver, const char *buf, size_t count)
-+new_id_store(struct device_driver *driver, const char *buf, size_t count)
- {
- struct pcmcia_dynid *dynid;
- struct pcmcia_driver *pdrv = to_pcmcia_drv(driver);
-@@ -133,7 +133,7 @@ pcmcia_store_new_id(struct device_driver
- return retval;
- return count;
- }
--static DRIVER_ATTR(new_id, S_IWUSR, NULL, pcmcia_store_new_id);
-+static DRIVER_ATTR_WO(new_id, S_IWUSR, NULL, pcmcia_store_new_id);
-
- static void
- pcmcia_free_dynids(struct pcmcia_driver *drv)
diff --git a/d10.patch b/d10.patch
deleted file mode 100644
index ec3d5816638ba9..00000000000000
--- a/d10.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From foo@baz Thu Jun 8 15:18:55 CEST 2017
-Date: Thu, 08 Jun 2017 15:18:55 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: platform: thinkpad_acpi: convert to use DRIVER_ATTR_RO/RW
-
-We are trying to get rid of DRIVER_ATTR(), and the thinkpad_acpi
-driver's attributes can be trivially changed to use DRIVER_ATTR_RO() and
-DRIVER_ATTR_RW().
-
-Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
-Cc: Darren Hart <dvhart@infradead.org>
-Cc: Andy Shevchenko <andy@infradead.org>
-Cc: <ibm-acpi-devel@lists.sourceforge.net>
-Cc: <platform-driver-x86@vger.kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/platform/x86/thinkpad_acpi.c | 91 ++++++++++-------------------------
- 1 file changed, 28 insertions(+), 63 deletions(-)
-
---- a/drivers/platform/x86/thinkpad_acpi.c
-+++ b/drivers/platform/x86/thinkpad_acpi.c
-@@ -1438,25 +1438,20 @@ static int tpacpi_rfk_procfs_write(const
- */
-
- /* interface_version --------------------------------------------------- */
--static ssize_t tpacpi_driver_interface_version_show(
-- struct device_driver *drv,
-- char *buf)
-+static ssize_t interface_version_show(struct device_driver *drv, char *buf)
- {
- return snprintf(buf, PAGE_SIZE, "0x%08x\n", TPACPI_SYSFS_VERSION);
- }
--
--static DRIVER_ATTR(interface_version, S_IRUGO,
-- tpacpi_driver_interface_version_show, NULL);
-+static DRIVER_ATTR_RO(interface_version);
-
- /* debug_level --------------------------------------------------------- */
--static ssize_t tpacpi_driver_debug_show(struct device_driver *drv,
-- char *buf)
-+static ssize_t debug_level_show(struct device_driver *drv, char *buf)
- {
- return snprintf(buf, PAGE_SIZE, "0x%04x\n", dbg_level);
- }
-
--static ssize_t tpacpi_driver_debug_store(struct device_driver *drv,
-- const char *buf, size_t count)
-+static ssize_t debug_level_store(struct device_driver *drv, const char *buf,
-+ size_t count)
- {
- unsigned long t;
-
-@@ -1467,34 +1462,28 @@ static ssize_t tpacpi_driver_debug_store
-
- return count;
- }
--
--static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO,
-- tpacpi_driver_debug_show, tpacpi_driver_debug_store);
-+static DRIVER_ATTR_RW(debug_level);
-
- /* version ------------------------------------------------------------- */
--static ssize_t tpacpi_driver_version_show(struct device_driver *drv,
-- char *buf)
-+static ssize_t version_show(struct device_driver *drv, char *buf)
- {
- return snprintf(buf, PAGE_SIZE, "%s v%s\n",
- TPACPI_DESC, TPACPI_VERSION);
- }
--
--static DRIVER_ATTR(version, S_IRUGO,
-- tpacpi_driver_version_show, NULL);
-+static DRIVER_ATTR_RO(version);
-
- /* --------------------------------------------------------------------- */
-
- #ifdef CONFIG_THINKPAD_ACPI_DEBUGFACILITIES
-
- /* wlsw_emulstate ------------------------------------------------------ */
--static ssize_t tpacpi_driver_wlsw_emulstate_show(struct device_driver *drv,
-- char *buf)
-+static ssize_t wlsw_emulstate_show(struct device_driver *drv, char *buf)
- {
- return snprintf(buf, PAGE_SIZE, "%d\n", !!tpacpi_wlsw_emulstate);
- }
-
--static ssize_t tpacpi_driver_wlsw_emulstate_store(struct device_driver *drv,
-- const char *buf, size_t count)
-+static ssize_t wlsw_emulstate_store(struct device_driver *drv, const char *buf,
-+ size_t count)
- {
- unsigned long t;
-
-@@ -1508,22 +1497,16 @@ static ssize_t tpacpi_driver_wlsw_emulst
-
- return count;
- }
--
--static DRIVER_ATTR(wlsw_emulstate, S_IWUSR | S_IRUGO,
-- tpacpi_driver_wlsw_emulstate_show,
-- tpacpi_driver_wlsw_emulstate_store);
-+static DRIVER_ATTR_RW(wlsw_emulstate);
-
- /* bluetooth_emulstate ------------------------------------------------- */
--static ssize_t tpacpi_driver_bluetooth_emulstate_show(
-- struct device_driver *drv,
-- char *buf)
-+static ssize_t bluetooth_emulstate_show(struct device_driver *drv, char *buf)
- {
- return snprintf(buf, PAGE_SIZE, "%d\n", !!tpacpi_bluetooth_emulstate);
- }
-
--static ssize_t tpacpi_driver_bluetooth_emulstate_store(
-- struct device_driver *drv,
-- const char *buf, size_t count)
-+static ssize_t bluetooth_emulstate_store(struct device_driver *drv,
-+ const char *buf, size_t count)
- {
- unsigned long t;
-
-@@ -1534,22 +1517,16 @@ static ssize_t tpacpi_driver_bluetooth_e
-
- return count;
- }
--
--static DRIVER_ATTR(bluetooth_emulstate, S_IWUSR | S_IRUGO,
-- tpacpi_driver_bluetooth_emulstate_show,
-- tpacpi_driver_bluetooth_emulstate_store);
-+static DRIVER_ATTR_RW(bluetooth_emulstate);
-
- /* wwan_emulstate ------------------------------------------------- */
--static ssize_t tpacpi_driver_wwan_emulstate_show(
-- struct device_driver *drv,
-- char *buf)
-+static ssize_t wwan_emulstate_show(struct device_driver *drv, char *buf)
- {
- return snprintf(buf, PAGE_SIZE, "%d\n", !!tpacpi_wwan_emulstate);
- }
-
--static ssize_t tpacpi_driver_wwan_emulstate_store(
-- struct device_driver *drv,
-- const char *buf, size_t count)
-+static ssize_t wwan_emulstate_store(struct device_driver *drv, const char *buf,
-+ size_t count)
- {
- unsigned long t;
-
-@@ -1560,22 +1537,16 @@ static ssize_t tpacpi_driver_wwan_emulst
-
- return count;
- }
--
--static DRIVER_ATTR(wwan_emulstate, S_IWUSR | S_IRUGO,
-- tpacpi_driver_wwan_emulstate_show,
-- tpacpi_driver_wwan_emulstate_store);
-+static DRIVER_ATTR_RW(wwan_emulstate);
-
- /* uwb_emulstate ------------------------------------------------- */
--static ssize_t tpacpi_driver_uwb_emulstate_show(
-- struct device_driver *drv,
-- char *buf)
-+static ssize_t uwb_emulstate_show(struct device_driver *drv, char *buf)
- {
- return snprintf(buf, PAGE_SIZE, "%d\n", !!tpacpi_uwb_emulstate);
- }
-
--static ssize_t tpacpi_driver_uwb_emulstate_store(
-- struct device_driver *drv,
-- const char *buf, size_t count)
-+static ssize_t uwb_emulstate_store(struct device_driver *drv, const char *buf,
-+ size_t count)
- {
- unsigned long t;
-
-@@ -1586,10 +1557,7 @@ static ssize_t tpacpi_driver_uwb_emulsta
-
- return count;
- }
--
--static DRIVER_ATTR(uwb_emulstate, S_IWUSR | S_IRUGO,
-- tpacpi_driver_uwb_emulstate_show,
-- tpacpi_driver_uwb_emulstate_store);
-+static DRIVER_ATTR_RW(uwb_emulstate);
- #endif
-
- /* --------------------------------------------------------------------- */
-@@ -8606,14 +8574,13 @@ static ssize_t fan_fan2_input_show(struc
- static DEVICE_ATTR(fan2_input, S_IRUGO, fan_fan2_input_show, NULL);
-
- /* sysfs fan fan_watchdog (hwmon driver) ------------------------------- */
--static ssize_t fan_fan_watchdog_show(struct device_driver *drv,
-- char *buf)
-+static ssize_t fan_watchdog_show(struct device_driver *drv, char *buf)
- {
- return snprintf(buf, PAGE_SIZE, "%u\n", fan_watchdog_maxinterval);
- }
-
--static ssize_t fan_fan_watchdog_store(struct device_driver *drv,
-- const char *buf, size_t count)
-+static ssize_t fan_watchdog_store(struct device_driver *drv, const char *buf,
-+ size_t count)
- {
- unsigned long t;
-
-@@ -8630,9 +8597,7 @@ static ssize_t fan_fan_watchdog_store(st
-
- return count;
- }
--
--static DRIVER_ATTR(fan_watchdog, S_IWUSR | S_IRUGO,
-- fan_fan_watchdog_show, fan_fan_watchdog_store);
-+static DRIVER_ATTR_RW(fan_watchdog);
-
- /* --------------------------------------------------------------------- */
- static struct attribute *fan_attributes[] = {
diff --git a/d11.patch b/d11.patch
deleted file mode 100644
index 74086a6c28e4c9..00000000000000
--- a/d11.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-From foo@baz Thu Jun 8 15:28:21 CEST 2017
-Date: Thu, 08 Jun 2017 15:28:21 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: s390: drivers: convert to use DRIVER_ATTR_RO/WO
-
-We are trying to get rid of DRIVER_ATTR(), and the s390 drivers'
-attributes can be trivially changed to use DRIVER_ATTR_RO() and
-DRIVER_ATTR_WO().
-
-Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
-Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
-Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
-Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
-Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
-Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
-Cc: <linux-s390@vger.kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/s390/char/sclp.c | 12 ++++++------
- drivers/s390/char/vmlogrdr.c | 7 ++-----
- drivers/s390/net/lcs.c | 6 +++---
- drivers/s390/net/netiucv.c | 14 ++++++--------
- drivers/s390/net/qeth_core_main.c | 6 +++---
- 5 files changed, 20 insertions(+), 25 deletions(-)
-
---- a/drivers/s390/char/sclp.c
-+++ b/drivers/s390/char/sclp.c
-@@ -1096,26 +1096,26 @@ static const struct dev_pm_ops sclp_pm_o
- .restore = sclp_restore,
- };
-
--static ssize_t sclp_show_console_pages(struct device_driver *dev, char *buf)
-+static ssize_t console_pages_show(struct device_driver *dev, char *buf)
- {
- return sprintf(buf, "%i\n", sclp_console_pages);
- }
-
--static DRIVER_ATTR(con_pages, S_IRUSR, sclp_show_console_pages, NULL);
-+static DRIVER_ATTR_RO(con_pages);
-
--static ssize_t sclp_show_con_drop(struct device_driver *dev, char *buf)
-+static ssize_t con_drop_show(struct device_driver *dev, char *buf)
- {
- return sprintf(buf, "%i\n", sclp_console_drop);
- }
-
--static DRIVER_ATTR(con_drop, S_IRUSR, sclp_show_con_drop, NULL);
-+static DRIVER_ATTR_RO(con_drop);
-
--static ssize_t sclp_show_console_full(struct device_driver *dev, char *buf)
-+static ssize_t con_full_show(struct device_driver *dev, char *buf)
- {
- return sprintf(buf, "%lu\n", sclp_console_full);
- }
-
--static DRIVER_ATTR(con_full, S_IRUSR, sclp_show_console_full, NULL);
-+static DRIVER_ATTR_RO(con_full);
-
- static struct attribute *sclp_drv_attrs[] = {
- &driver_attr_con_pages.attr,
---- a/drivers/s390/char/vmlogrdr.c
-+++ b/drivers/s390/char/vmlogrdr.c
-@@ -641,10 +641,8 @@ static ssize_t vmlogrdr_recording_store(
- static DEVICE_ATTR(recording, 0200, NULL, vmlogrdr_recording_store);
-
-
--static ssize_t vmlogrdr_recording_status_show(struct device_driver *driver,
-- char *buf)
-+static ssize_t recording_status_show(struct device_driver *driver, char *buf)
- {
--
- static const char cp_command[] = "QUERY RECORDING ";
- int len;
-
-@@ -652,8 +650,7 @@ static ssize_t vmlogrdr_recording_status
- len = strlen(buf);
- return len;
- }
--static DRIVER_ATTR(recording_status, 0444, vmlogrdr_recording_status_show,
-- NULL);
-+static DRIVER_ATTR_RO(recording_status);
- static struct attribute *vmlogrdr_drv_attrs[] = {
- &driver_attr_recording_status.attr,
- NULL,
---- a/drivers/s390/net/lcs.c
-+++ b/drivers/s390/net/lcs.c
-@@ -2411,14 +2411,14 @@ static struct ccwgroup_driver lcs_group_
- .restore = lcs_restore,
- };
-
--static ssize_t lcs_driver_group_store(struct device_driver *ddrv,
-- const char *buf, size_t count)
-+static ssize_t group_store(struct device_driver *ddrv, const char *buf,
-+ size_t count)
- {
- int err;
- err = ccwgroup_create_dev(lcs_root_dev, &lcs_group_driver, 2, buf);
- return err ? err : count;
- }
--static DRIVER_ATTR(group, 0200, NULL, lcs_driver_group_store);
-+static DRIVER_ATTR_WO(group);
-
- static struct attribute *lcs_drv_attrs[] = {
- &driver_attr_group.attr,
---- a/drivers/s390/net/netiucv.c
-+++ b/drivers/s390/net/netiucv.c
-@@ -2020,8 +2020,8 @@ out_netdev:
- return NULL;
- }
-
--static ssize_t conn_write(struct device_driver *drv,
-- const char *buf, size_t count)
-+static ssize_t connection_store(struct device_driver *drv, const char *buf,
-+ size_t count)
- {
- char username[9];
- char userdata[17];
-@@ -2082,11 +2082,10 @@ out_free_ndev:
- netiucv_free_netdevice(dev);
- return rc;
- }
-+static DRIVER_ATTR_WO(connection);
-
--static DRIVER_ATTR(connection, 0200, NULL, conn_write);
--
--static ssize_t remove_write (struct device_driver *drv,
-- const char *buf, size_t count)
-+static ssize_t remove_store(struct device_driver *drv, const char *buf,
-+ size_t count)
- {
- struct iucv_connection *cp;
- struct net_device *ndev;
-@@ -2132,8 +2131,7 @@ static ssize_t remove_write (struct devi
- IUCV_DBF_TEXT(data, 2, "remove_write: unknown device\n");
- return -EINVAL;
- }
--
--static DRIVER_ATTR(remove, 0200, NULL, remove_write);
-+static DRIVER_ATTR_WO(remove);
-
- static struct attribute * netiucv_drv_attrs[] = {
- &driver_attr_connection.attr,
---- a/drivers/s390/net/qeth_core_main.c
-+++ b/drivers/s390/net/qeth_core_main.c
-@@ -5800,8 +5800,8 @@ static struct ccwgroup_driver qeth_core_
- .restore = qeth_core_restore,
- };
-
--static ssize_t qeth_core_driver_group_store(struct device_driver *ddrv,
-- const char *buf, size_t count)
-+static ssize_t group_store(struct device_driver *ddrv, const char *buf,
-+ size_t count)
- {
- int err;
-
-@@ -5810,7 +5810,7 @@ static ssize_t qeth_core_driver_group_st
-
- return err ? err : count;
- }
--static DRIVER_ATTR(group, 0200, NULL, qeth_core_driver_group_store);
-+static DRIVER_ATTR_WO(group);
-
- static struct attribute *qeth_drv_attrs[] = {
- &driver_attr_group.attr,
diff --git a/d12.patch b/d12.patch
deleted file mode 100644
index 59a2a592a4c9ef..00000000000000
--- a/d12.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From foo@baz Thu Jun 8 15:32:05 CEST 2017
-Date: Thu, 08 Jun 2017 15:32:05 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: USB: usbip: convert to use DRIVER_ATTR_RW
-
-We are trying to get rid of DRIVER_ATTR(), and the usbip driver
-attribute can be trivially changed to use DRIVER_ATTR_RW().
-
-Cc: Valentina Manea <valentina.manea.m@gmail.com>
-Cc: Shuah Khan <shuah@kernel.org>
-Cc: <linux-usb@vger.kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/usb/usbip/stub_main.c | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
---- a/drivers/usb/usbip/stub_main.c
-+++ b/drivers/usb/usbip/stub_main.c
-@@ -134,7 +134,7 @@ out:
- return ret;
- }
-
--static ssize_t show_match_busid(struct device_driver *drv, char *buf)
-+static ssize_t match_busid_show(struct device_driver *drv, char *buf)
- {
- int i;
- char *out = buf;
-@@ -149,7 +149,7 @@ static ssize_t show_match_busid(struct d
- return out - buf;
- }
-
--static ssize_t store_match_busid(struct device_driver *dev, const char *buf,
-+static ssize_t match_busid_store(struct device_driver *dev, const char *buf,
- size_t count)
- {
- int len;
-@@ -181,8 +181,7 @@ static ssize_t store_match_busid(struct
-
- return -EINVAL;
- }
--static DRIVER_ATTR(match_busid, S_IRUSR | S_IWUSR, show_match_busid,
-- store_match_busid);
-+static DRIVER_ATTR_RW(match_busid);
-
- static ssize_t rebind_store(struct device_driver *dev, const char *buf,
- size_t count)
diff --git a/d13.patch b/d13.patch
index aec58db47c1152..548251452cb571 100644
--- a/d13.patch
+++ b/d13.patch
@@ -4,7 +4,7 @@
--- a/drivers/video/fbdev/uvesafb.c
+++ b/drivers/video/fbdev/uvesafb.c
-@@ -1883,19 +1883,18 @@ static int uvesafb_setup(char *options)
+@@ -1860,19 +1860,18 @@ static int uvesafb_setup(char *options)
}
#endif /* !MODULE */
diff --git a/d15.patch b/d15.patch
deleted file mode 100644
index e04e629a86a596..00000000000000
--- a/d15.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From foo@baz Thu Jun 8 15:34:49 CEST 2017
-Date: Thu, 08 Jun 2017 15:34:49 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: s390 squash
-
----
- drivers/s390/net/ctcm_main.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-
---- a/drivers/s390/net/ctcm_main.c
-+++ b/drivers/s390/net/ctcm_main.c
-@@ -1770,15 +1770,15 @@ static struct ccwgroup_driver ctcm_group
- .restore = ctcm_pm_resume,
- };
-
--static ssize_t ctcm_driver_group_store(struct device_driver *ddrv,
-- const char *buf, size_t count)
-+static ssize_t group_store(struct device_driver *ddrv, const char *buf,
-+ size_t count)
- {
- int err;
-
- err = ccwgroup_create_dev(ctcm_root_dev, &ctcm_group_driver, 2, buf);
- return err ? err : count;
- }
--static DRIVER_ATTR(group, 0200, NULL, ctcm_driver_group_store);
-+static DRIVER_ATTR_WO(group);
-
- static struct attribute *ctcm_drv_attrs[] = {
- &driver_attr_group.attr,
diff --git a/driver-core-remove-class_attr-usage.patch b/driver-core-remove-class_attr-usage.patch
deleted file mode 100644
index 579885d665427f..00000000000000
--- a/driver-core-remove-class_attr-usage.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From foo@baz Tue Jun 6 15:26:21 CEST 2017
-Date: Tue, 06 Jun 2017 15:26:21 +0200
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: [PATCH] driver core: remove CLASS_ATTR usage
-
-There was only 2 remaining users of CLASS_ATTR() so let's finally get
-rid of them and force everyone to use the correct _RW/RO/WO versions
-instead.
-
-Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-Cc: Paul Mackerras <paulus@samba.org>
-Cc: Michael Ellerman <mpe@ellerman.id.au>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/powerpc/platforms/pseries/dlpar.c | 2 +-
- arch/powerpc/platforms/pseries/mobility.c | 7 ++++---
- include/linux/device.h | 2 --
- 3 files changed, 5 insertions(+), 6 deletions(-)
-
---- a/arch/powerpc/platforms/pseries/dlpar.c
-+++ b/arch/powerpc/platforms/pseries/dlpar.c
-@@ -588,7 +588,7 @@ static ssize_t dlpar_show(struct class *
- return sprintf(buf, "%s\n", "memory,cpu");
- }
-
--static CLASS_ATTR(dlpar, S_IWUSR | S_IRUSR, dlpar_show, dlpar_store);
-+static CLASS_ATTR_RW(dlpar);
-
- static int __init pseries_dlpar_init(void)
- {
---- a/arch/powerpc/platforms/pseries/mobility.c
-+++ b/arch/powerpc/platforms/pseries/mobility.c
-@@ -349,8 +349,9 @@ void post_mobility_fixup(void)
- return;
- }
-
--static ssize_t migrate_store(struct class *class, struct class_attribute *attr,
-- const char *buf, size_t count)
-+static ssize_t migration_store(struct class *class,
-+ struct class_attribute *attr, const char *buf,
-+ size_t count)
- {
- u64 streamid;
- int rc;
-@@ -380,7 +381,7 @@ static ssize_t migrate_store(struct clas
- */
- #define MIGRATION_API_VERSION 1
-
--static CLASS_ATTR(migration, S_IWUSR, NULL, migrate_store);
-+static CLASS_ATTR_WO(migration);
- static CLASS_ATTR_STRING(api_version, S_IRUGO, __stringify(MIGRATION_API_VERSION));
-
- static int __init mobility_sysfs_init(void)
---- a/include/linux/device.h
-+++ b/include/linux/device.h
-@@ -465,8 +465,6 @@ struct class_attribute {
- const char *buf, size_t count);
- };
-
--#define CLASS_ATTR(_name, _mode, _show, _store) \
-- struct class_attribute class_attr_##_name = __ATTR(_name, _mode, _show, _store)
- #define CLASS_ATTR_RW(_name) \
- struct class_attribute class_attr_##_name = __ATTR_RW(_name)
- #define CLASS_ATTR_RO(_name) \
diff --git a/driver-core-remove-struct-bus_type.dev_attrs.patch b/driver-core-remove-struct-bus_type.dev_attrs.patch
deleted file mode 100644
index f8fb2d3c4c4fa5..00000000000000
--- a/driver-core-remove-struct-bus_type.dev_attrs.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From eadcf44e93770c9816135dcfe742e6734c4b05f2 Mon Sep 17 00:00:00 2001
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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
-it, can be removed.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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 *bus, struct device_driver *start,
- }
- EXPORT_SYMBOL_GPL(bus_for_each_drv);
-
--static int device_add_attrs(struct bus_type *bus, struct device *dev)
--{
-- int error = 0;
-- int i;
--
-- if (!bus->dev_attrs)
-- return 0;
--
-- for (i = 0; bus->dev_attrs[i].attr.name; i++) {
-- error = device_create_file(dev, &bus->dev_attrs[i]);
-- if (error) {
-- while (--i >= 0)
-- device_remove_file(dev, &bus->dev_attrs[i]);
-- break;
-- }
-- }
-- return error;
--}
--
--static void device_remove_attrs(struct bus_type *bus, struct device *dev)
--{
-- int i;
--
-- if (bus->dev_attrs) {
-- for (i = 0; bus->dev_attrs[i].attr.name; i++)
-- device_remove_file(dev, &bus->dev_attrs[i]);
-- }
--}
--
- /**
- * bus_add_device - add device to bus
- * @dev: device being added
-@@ -510,12 +481,9 @@ int bus_add_device(struct device *dev)
-
- if (bus) {
- pr_debug("bus: '%s': add device %s\n", bus->name, dev_name(dev));
-- error = device_add_attrs(bus, dev);
-- if (error)
-- goto out_put;
- error = device_add_groups(dev, bus->dev_groups);
- if (error)
-- goto out_id;
-+ goto out_put;
- error = sysfs_create_link(&bus->p->devices_kset->kobj,
- &dev->kobj, dev_name(dev));
- if (error)
-@@ -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);
--out_id:
-- device_remove_attrs(bus, dev);
- out_put:
- bus_put(dev->bus);
- return error;
-@@ -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));
-- device_remove_attrs(dev->bus, dev);
- 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_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.
-- * @dev_attrs: Default attributes of the devices on the bus.
- * @bus_groups: Default attributes of the bus.
- * @dev_groups: Default attributes of the devices on the bus.
- * @drv_groups: Default attributes of the device drivers on the bus.
-@@ -112,7 +111,6 @@ struct bus_type {
- const char *name;
- const char *dev_name;
- struct device *dev_root;
-- struct device_attribute *dev_attrs; /* use dev_groups instead */
- 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
deleted file mode 100644
index 9eeaadcff0433c..00000000000000
--- a/hid-intel-ish-hid-use-dev_groups-and-not-dev_attrs.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-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
deleted file mode 100644
index 2a965f2c359f12..00000000000000
--- a/hwtracing-intel_th-use-dev_groups-and-not-dev_attrs.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-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/macintosh-use-dev_groups-and-not-dev_attrs-for.patch b/macintosh-use-dev_groups-and-not-dev_attrs-for.patch
deleted file mode 100644
index 2d9bcfc064715c..00000000000000
--- a/macintosh-use-dev_groups-and-not-dev_attrs-for.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-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 +++++++++++++++++++++--------
- 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 device * dev)
- return 0;
- }
-
--extern struct device_attribute macio_dev_attrs[];
-+extern const struct attribute_group *macio_dev_groups[];
-
- struct bus_type macio_bus_type = {
- .name = "macio",
-@@ -144,7 +144,7 @@ struct bus_type macio_bus_type = {
- .shutdown = macio_device_shutdown,
- .suspend = macio_device_suspend,
- .resume = macio_device_resume,
-- .dev_attrs = macio_dev_attrs,
-+ .dev_groups = macio_dev_groups,
- };
-
- 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 device_attribute *attr, \
- { \
- struct macio_dev *mdev = to_macio_device (dev); \
- return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \
--}
-+} \
-+static DEVICE_ATTR_RO(field);
-
- static ssize_t
- compatible_show (struct device *dev, struct device_attribute *attr, char *buf)
-@@ -37,6 +38,7 @@ compatible_show (struct device *dev, struct device_attribute *attr, char *buf)
-
- return length;
- }
-+static DEVICE_ATTR_RO(compatible);
-
- static ssize_t modalias_show (struct device *dev, struct device_attribute *attr,
- char *buf)
-@@ -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);
- }
-+static DEVICE_ATTR_RO(modalias);
-+static DEVICE_ATTR_RO(devspec);
-
- macio_config_of_attr (name, "%s\n");
- macio_config_of_attr (type, "%s\n");
-
--struct device_attribute macio_dev_attrs[] = {
-- __ATTR_RO(name),
-- __ATTR_RO(type),
-- __ATTR_RO(compatible),
-- __ATTR_RO(modalias),
-- __ATTR_RO(devspec),
-- __ATTR_NULL
-+static struct attribute *macio_dev_attrs[] = {
-+ &dev_attr_name.attr,
-+ &dev_attr_type.attr,
-+ &dev_attr_compatible.attr,
-+ &dev_attr_modalias.attr,
-+ &dev_attr_devspec.attr,
-+ NULL,
-+};
-+
-+static const struct attribute_group macio_dev_group = {
-+ .attrs = macio_dev_attrs,
-+};
-+
-+const struct attribute_group *macio_dev_groups[] = {
-+ &macio_dev_group,
-+ NULL,
- };
---
-2.13.0
-
diff --git a/mips-sgi-ip22-ecard-use-dev_groups-and-not-dev_attrs.patch b/mips-sgi-ip22-ecard-use-dev_groups-and-not-dev_attrs.patch
deleted file mode 100644
index dbbd5e7450fcd7..00000000000000
--- a/mips-sgi-ip22-ecard-use-dev_groups-and-not-dev_attrs.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-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 ++++++++++------
- 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 device *dev, struct device_attribute *a,
-
- return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
- }
-+static DEVICE_ATTR_RO(modalias);
-
- 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 *dev,
- giodev = to_gio_device(dev);
- return sprintf(buf, "%s", giodev->name);
- }
-+static DEVICE_ATTR_RO(name);
-
- 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 *dev,
- giodev = to_gio_device(dev);
- return sprintf(buf, "%x", giodev->id.id);
- }
-+static DEVICE_ATTR_RO(id);
-
--static struct device_attribute gio_dev_attrs[] = {
-- __ATTR_RO(modalias),
-- __ATTR_RO(name),
-- __ATTR_RO(id),
-- __ATTR_NULL,
-+static struct attribute *gio_dev_attrs[] = {
-+ &dev_attr_modalias.attr,
-+ &dev_attr_name.attr,
-+ &dev_attr_id.attr,
-+ NULL,
- };
-+ATTRIBUTE_GROUPS(gio_dev);
-
- static int gio_device_uevent(struct device *dev, struct kobj_uevent_env *env)
- {
-@@ -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",
-- .dev_attrs = gio_dev_attrs,
-+ .dev_groups = gio_dev_groups,
- .match = gio_bus_match,
- .probe = gio_device_probe,
- .remove = gio_device_remove,
---
-2.13.0
-
diff --git a/parisc-parisc_bus_type-use-dev_groups-and-not.patch b/parisc-parisc_bus_type-use-dev_groups-and-not.patch
deleted file mode 100644
index 815cbb91b9e8d8..00000000000000
--- a/parisc-parisc_bus_type-use-dev_groups-and-not.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-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 +++++++++++++----------
- 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 *dev, struct device_attribute *attr, ch
- { \
- struct parisc_device *padev = to_parisc_device(dev); \
- return sprintf(buf, format_string, padev->field); \
--}
-+} \
-+static DEVICE_ATTR_RO(name);
-
- #define pa_dev_attr_id(field, format) pa_dev_attr(field, id.field, format)
-
-@@ -589,22 +590,24 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
- {
- return make_modalias(dev, buf);
- }
-+static DEVICE_ATTR_RO(modalias);
-
--static struct device_attribute parisc_device_attrs[] = {
-- __ATTR_RO(irq),
-- __ATTR_RO(hw_type),
-- __ATTR_RO(rev),
-- __ATTR_RO(hversion),
-- __ATTR_RO(sversion),
-- __ATTR_RO(modalias),
-- __ATTR_NULL,
-+static struct attribute *parisc_device_attrs[] = {
-+ &dev_attr_irq.attr,
-+ &dev_attr_hw_type.attr,
-+ &dev_attr_rev.attr,
-+ &dev_attr_hversion.attr,
-+ &dev_attr_sversion.attr,
-+ &dev_attr_modalias.attr,
-+ NULL,
- };
-+ATTRIBUTE_GROUPS(parisc_device);
-
- struct bus_type parisc_bus_type = {
- .name = "parisc",
- .match = parisc_generic_match,
- .uevent = parisc_uevent,
-- .dev_attrs = parisc_device_attrs,
-+ .dev_groups = parisc_device_groups,
- .probe = parisc_driver_probe,
- .remove = parisc_driver_remove,
- };
---
-2.13.0
-
diff --git a/pci_groups.patch b/pci_groups.patch
index a9bd7d50871427..856a9d26b29bad 100644
--- a/pci_groups.patch
+++ b/pci_groups.patch
@@ -111,7 +111,7 @@
}
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
-@@ -1299,6 +1299,7 @@ int __pci_register_driver(struct pci_dri
+@@ -1305,6 +1305,7 @@ int __pci_register_driver(struct pci_dri
drv->driver.bus = &pci_bus_type;
drv->driver.owner = owner;
drv->driver.mod_name = mod_name;
@@ -121,7 +121,7 @@
INIT_LIST_HEAD(&drv->dynids.list);
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
-@@ -716,6 +716,7 @@ struct pci_driver {
+@@ -729,6 +729,7 @@ struct pci_driver {
void (*shutdown) (struct pci_dev *dev);
int (*sriov_configure) (struct pci_dev *dev, int num_vfs); /* PF pdev */
const struct pci_error_handlers *err_handler;
diff --git a/powerpc-ibmebus-use-dev_groups-and-not-dev_attrs-for.patch b/powerpc-ibmebus-use-dev_groups-and-not-dev_attrs-for.patch
deleted file mode 100644
index e16c9363c4931e..00000000000000
--- a/powerpc-ibmebus-use-dev_groups-and-not-dev_attrs-for.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-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 ++++++++++------
- 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 device *dev,
- ofdev = to_platform_device(dev);
- return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name);
- }
-+static DEVICE_ATTR_RO(devspec);
-
- 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 *dev,
- ofdev = to_platform_device(dev);
- return sprintf(buf, "%s\n", ofdev->dev.of_node->name);
- }
-+static DEVICE_ATTR_RO(name);
-
- static ssize_t modalias_show(struct device *dev,
- struct device_attribute *attr, char *buf)
- {
- return of_device_modalias(dev, buf, PAGE_SIZE);
- }
-+static DEVICE_ATTR_RO(modalias);
-
--static struct device_attribute ibmebus_bus_device_attrs[] = {
-- __ATTR_RO(devspec),
-- __ATTR_RO(name),
-- __ATTR_RO(modalias),
-- __ATTR_NULL
-+static struct attribute *ibmebus_bus_device_attrs[] = {
-+ &dev_attr_devspec.attr,
-+ &dev_attr_name.attr,
-+ &dev_attr_modalias.attr,
-+ NULL,
- };
-+ATTRIBUTE_GROUPS(ibmebus_bus_device);
-
- struct bus_type ibmebus_bus_type = {
- .name = "ibmebus",
-@@ -428,7 +432,7 @@ struct bus_type ibmebus_bus_type = {
- .probe = ibmebus_bus_device_probe,
- .remove = ibmebus_bus_device_remove,
- .shutdown = ibmebus_bus_device_shutdown,
-- .dev_attrs = ibmebus_bus_device_attrs,
-+ .dev_groups = ibmebus_bus_device_groups,
- };
- 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
deleted file mode 100644
index 11f9066724e7ba..00000000000000
--- a/powerpc-ps3-use-dev_groups-and-not-dev_attrs-for.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-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
deleted file mode 100644
index e45ca09f0a788a..00000000000000
--- a/powerpc-vio-use-dev_groups-and-not-dev_attrs-for.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-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/powerpc-vio_cmo-use-dev_groups-and-not-dev_attrs-for.patch b/powerpc-vio_cmo-use-dev_groups-and-not-dev_attrs-for.patch
deleted file mode 100644
index 256ebabcf62fa9..00000000000000
--- a/powerpc-vio_cmo-use-dev_groups-and-not-dev_attrs-for.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-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 | 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)
- /* sysfs device functions and data structures for CMO */
-
- #define viodev_cmo_rd_attr(name) \
--static ssize_t viodev_cmo_##name##_show(struct device *dev, \
-+static ssize_t cmo_##name##_show(struct device *dev, \
- struct device_attribute *attr, \
- char *buf) \
- { \
-@@ -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));
- }
-
--static ssize_t viodev_cmo_allocs_failed_reset(struct device *dev,
-+static ssize_t cmo_allocs_failed_store(struct device *dev,
- 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_reset(struct device *dev,
- return count;
- }
-
--static ssize_t viodev_cmo_desired_set(struct device *dev,
-+static ssize_t cmo_desired_store(struct device *dev,
- 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 *, 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);
--static struct device_attribute vio_cmo_dev_attrs[] = {
-- __ATTR_RO(name),
-- __ATTR_RO(devspec),
-- __ATTR_RO(modalias),
-- __ATTR(cmo_desired, S_IWUSR|S_IRUSR|S_IWGRP|S_IRGRP|S_IROTH,
-- viodev_cmo_desired_show, viodev_cmo_desired_set),
-- __ATTR(cmo_entitled, S_IRUGO, viodev_cmo_entitled_show, NULL),
-- __ATTR(cmo_allocated, S_IRUGO, viodev_cmo_allocated_show, NULL),
-- __ATTR(cmo_allocs_failed, S_IWUSR|S_IRUSR|S_IWGRP|S_IRGRP|S_IROTH,
-- viodev_cmo_allocs_failed_show, viodev_cmo_allocs_failed_reset),
-- __ATTR_NULL
-+static DEVICE_ATTR_RO(name);
-+static DEVICE_ATTR_RO(devspec);
-+static DEVICE_ATTR_RO(modalias);
-+static DEVICE_ATTR_RO(cmo_entitled);
-+static DEVICE_ATTR_RO(cmo_allocated);
-+static DEVICE_ATTR_RW(cmo_desired);
-+static DEVICE_ATTR_RW(cmo_allocs_failed);
-+
-+static struct attribute *vio_cmo_dev_attrs[] = {
-+ &dev_attr_name.attr,
-+ &dev_attr_devspec.attr,
-+ &dev_attr_modalias.attr,
-+ &dev_attr_cmo_entitled.attr,
-+ &dev_attr_cmo_allocated.attr,
-+ &dev_attr_cmo_desired.attr,
-+ &dev_attr_cmo_allocs_failed.attr,
-+ NULL,
- };
-+ATTRIBUTE_GROUPS(vio_cmo_dev);
-
- /* sysfs bus functions and data structures for CMO */
-
-@@ -1066,7 +1073,7 @@ ATTRIBUTE_GROUPS(vio_bus);
-
- static void vio_cmo_sysfs_init(void)
- {
-- vio_bus_type.dev_attrs = vio_cmo_dev_attrs;
-+ vio_bus_type.dev_groups = vio_cmo_dev_groups;
- vio_bus_type.bus_groups = vio_bus_groups;
- }
- #else /* CONFIG_PPC_SMLPAR */
---
-2.13.0
-
diff --git a/rpmsg-use-dev_groups-and-not-dev_attrs-for-bus_type.patch b/rpmsg-use-dev_groups-and-not-dev_attrs-for-bus_type.patch
deleted file mode 100644
index 15cc6536e5457c..00000000000000
--- a/rpmsg-use-dev_groups-and-not-dev_attrs-for-bus_type.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-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 | 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, \
- struct rpmsg_device *rpdev = to_rpmsg_device(dev); \
- \
- return sprintf(buf, format_string, rpdev->path); \
--}
-+} \
-+static DEVICE_ATTR_RO(field);
-
- /* 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 device *dev,
-
- return sprintf(buf, RPMSG_DEVICE_MODALIAS_FMT "\n", rpdev->id.name);
- }
--
--static struct device_attribute rpmsg_dev_attrs[] = {
-- __ATTR_RO(name),
-- __ATTR_RO(modalias),
-- __ATTR_RO(dst),
-- __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,
-+ &dev_attr_dst.attr,
-+ &dev_attr_src.attr,
-+ &dev_attr_announce.attr,
-+ NULL,
- };
-+ATTRIBUTE_GROUPS(rpmsg_dev);
-
- /* 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 device *dev)
- static struct bus_type rpmsg_bus = {
- .name = "rpmsg",
- .match = rpmsg_dev_match,
-- .dev_attrs = rpmsg_dev_attrs,
-+ .dev_groups = rpmsg_dev_groups,
- .uevent = rpmsg_uevent,
- .probe = rpmsg_dev_probe,
- .remove = rpmsg_dev_remove,
---
-2.13.0
-
diff --git a/series b/series
index 9dbc3c209dc3fc..39e74b5668e88e 100644
--- a/series
+++ b/series
@@ -1,6 +1,4 @@
#
-driver-core-remove-class_attr-usage.patch
-tests-convert-the-membarrier-test-to-tap-format.patch
lib-vsprintf-additional-kernel-pointer-filtering-options.patch
lib-vsprintf-whitelist-stack-traces.patch
lib-vsprintf-physical-address-kernel-pointer-filtering-options.patch
@@ -32,46 +30,12 @@ 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
-c03.patch
-c04.patch
-c05.patch
-c06.patch
-c07.patch
-c09.patch
-c99.patch
#
-d01.patch
-d02.patch
-d03.patch
-d04.patch
d05.patch
-d06.patch
-d07.patch
-d08.patch
-d09.patch
-d10.patch
-d11.patch
-d12.patch
d13.patch
d14.patch
-d15.patch
d16.patch
d99.patch
diff --git a/sh-superhyway-use-dev_groups-and-not-dev_attrs-for.patch b/sh-superhyway-use-dev_groups-and-not-dev_attrs-for.patch
deleted file mode 100644
index f07715231cdb76..00000000000000
--- a/sh-superhyway-use-dev_groups-and-not-dev_attrs-for.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-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 +-
- 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 *dev, struct device_attribute *attr, ch
- { \
- struct superhyway_device *s = to_superhyway_device(dev); \
- return sprintf(buf, fmt, s->field); \
--}
-+} \
-+static DEVICE_ATTR_RO(name);
-
- /* 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", vcr.top_mb);
- /* Misc */
- superhyway_ro_attr(resource, "0x%08lx\n", resource[0].start);
-
--struct device_attribute superhyway_dev_attrs[] = {
-- __ATTR_RO(perr_flags),
-- __ATTR_RO(merr_flags),
-- __ATTR_RO(mod_vers),
-- __ATTR_RO(mod_id),
-- __ATTR_RO(bot_mb),
-- __ATTR_RO(top_mb),
-- __ATTR_RO(resource),
-- __ATTR_NULL,
-+static struct attribute *superhyway_dev_attrs[] = {
-+ &dev_attr_perr_flags.attr,
-+ &dev_attr_merr_flags.attr,
-+ &dev_attr_mod_vers.attr,
-+ &dev_attr_mod_id.attr,
-+ &dev_attr_bot_mb.attr,
-+ &dev_attr_top_mb.attr,
-+ &dev_attr_resource.attr,
-+ NULL,
- };
-
-+static const struct attribute_group superhyway_dev_group = {
-+ .attrs = superhyway_dev_attrs,
-+};
-+
-+const struct attribute_group *superhyway_dev_groups[] = {
-+ &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 = {
- .name = "superhyway",
- .match = superhyway_bus_match,
- #ifdef CONFIG_SYSFS
-- .dev_attrs = superhyway_dev_attrs,
-+ .dev_groups = superhyway_dev_groups,
- #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 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 */
--extern struct device_attribute superhyway_dev_attrs[];
-+extern const struct attribute_group *superhyway_dev_groups[];
-
- #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
deleted file mode 100644
index fa6804b158f750..00000000000000
--- a/sparc-vio-use-dev_groups-and-not-dev_attrs-for.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-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
-
diff --git a/tests-convert-the-membarrier-test-to-tap-format.patch b/tests-convert-the-membarrier-test-to-tap-format.patch
deleted file mode 100644
index 6d4121d7d5b9c3..00000000000000
--- a/tests-convert-the-membarrier-test-to-tap-format.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From foo@baz Sat Jun 3 21:22:53 JST 2017
-Date: Sat, 03 Jun 2017 21:22:53 +0900
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: tests: convert the membarrier test to TAP format
-
-This converts the membarrier test to output things in TAP format instead
-of the "free-flowing" format it was previously using.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- tools/testing/selftests/membarrier/membarrier_test.c | 85 +++++++++++--------
- 1 file changed, 51 insertions(+), 34 deletions(-)
-
---- a/tools/testing/selftests/membarrier/membarrier_test.c
-+++ b/tools/testing/selftests/membarrier/membarrier_test.c
-@@ -13,45 +13,65 @@ enum test_membarrier_status {
- TEST_MEMBARRIER_SKIP,
- };
-
-+static int test_num = 0;
-+
- static int sys_membarrier(int cmd, int flags)
- {
- return syscall(__NR_membarrier, cmd, flags);
- }
-
-+static int test_result(const char *msg, int value)
-+{
-+ test_num++;
-+ printf("%s %d %s\n", value ? "not ok" : "ok", test_num, msg);
-+ return value;
-+}
-+
-+static int skip_tests(void)
-+{
-+ printf("Bail out\n");
-+ printf("1..%d\n", test_num);
-+ return ksft_exit_skip();
-+}
-+
-+static int bail_out(void)
-+{
-+ printf("Bail out!\n");
-+ printf("1..%d\n", test_num);
-+ return ksft_exit_fail();
-+}
-+
- static enum test_membarrier_status test_membarrier_cmd_fail(void)
- {
- int cmd = -1, flags = 0;
-+ const char *test_name = "membarrier command fail";
-
-- if (sys_membarrier(cmd, flags) != -1) {
-- printf("membarrier: Wrong command should fail but passed.\n");
-- return TEST_MEMBARRIER_FAIL;
-- }
-- return TEST_MEMBARRIER_PASS;
-+ if (sys_membarrier(cmd, flags) != -1)
-+ return test_result(test_name, TEST_MEMBARRIER_FAIL);
-+
-+ return test_result(test_name, TEST_MEMBARRIER_PASS);
- }
-
- static enum test_membarrier_status test_membarrier_flags_fail(void)
- {
- int cmd = MEMBARRIER_CMD_QUERY, flags = 1;
-+ const char *test_name = "Wrong flags should fail";
-
-- if (sys_membarrier(cmd, flags) != -1) {
-- printf("membarrier: Wrong flags should fail but passed.\n");
-- return TEST_MEMBARRIER_FAIL;
-- }
-- return TEST_MEMBARRIER_PASS;
-+ if (sys_membarrier(cmd, flags) != -1)
-+ return test_result(test_name, TEST_MEMBARRIER_FAIL);
-+
-+ return test_result(test_name, TEST_MEMBARRIER_PASS);
- }
-
- static enum test_membarrier_status test_membarrier_success(void)
- {
- int cmd = MEMBARRIER_CMD_SHARED, flags = 0;
-+ const char *test_name = "execute MEMBARRIER_CMD_SHARED";
-
-- if (sys_membarrier(cmd, flags) != 0) {
-- printf("membarrier: Executing MEMBARRIER_CMD_SHARED failed. %s.\n",
-- strerror(errno));
-- return TEST_MEMBARRIER_FAIL;
-- }
-+ if (sys_membarrier(cmd, flags) != 0)
-+ return test_result(test_name, TEST_MEMBARRIER_FAIL);
-
-- printf("membarrier: MEMBARRIER_CMD_SHARED success.\n");
-- return TEST_MEMBARRIER_PASS;
-+ return test_result(test_name, TEST_MEMBARRIER_PASS);
- }
-
- static enum test_membarrier_status test_membarrier(void)
-@@ -74,45 +94,42 @@ static enum test_membarrier_status test_
- {
- int flags = 0, ret;
-
-- printf("membarrier MEMBARRIER_CMD_QUERY ");
- ret = sys_membarrier(MEMBARRIER_CMD_QUERY, flags);
- if (ret < 0) {
-- printf("failed. %s.\n", strerror(errno));
-- switch (errno) {
-- case ENOSYS:
-+ if (errno == ENOSYS) {
- /*
- * It is valid to build a kernel with
- * CONFIG_MEMBARRIER=n. However, this skips the tests.
- */
-- return TEST_MEMBARRIER_SKIP;
-- case EINVAL:
-- default:
-- return TEST_MEMBARRIER_FAIL;
-+ test_result("CONFIG_MEMBARRIER is not enabled\n", 0);
-+ return skip_tests();
- }
-+ return test_result("sys_membarrier() failed\n",
-+ TEST_MEMBARRIER_FAIL);
- }
- if (!(ret & MEMBARRIER_CMD_SHARED)) {
-- printf("command MEMBARRIER_CMD_SHARED is not supported.\n");
-- return TEST_MEMBARRIER_FAIL;
-+ return test_result("command MEMBARRIER_CMD_SHARED is not supported.\n",
-+ TEST_MEMBARRIER_FAIL);
- }
-- printf("syscall available.\n");
-- return TEST_MEMBARRIER_PASS;
-+ return test_result("sys_membarrier availble", TEST_MEMBARRIER_PASS);
- }
-
- int main(int argc, char **argv)
- {
-+ printf("TAP version 13\n");
- switch (test_membarrier_query()) {
- case TEST_MEMBARRIER_FAIL:
-- return ksft_exit_fail();
-+ return bail_out();
- case TEST_MEMBARRIER_SKIP:
-- return ksft_exit_skip();
-+ return skip_tests();
- }
- switch (test_membarrier()) {
- case TEST_MEMBARRIER_FAIL:
-- return ksft_exit_fail();
-+ return bail_out();
- case TEST_MEMBARRIER_SKIP:
-- return ksft_exit_skip();
-+ return skip_tests();
- }
-
-- printf("membarrier: tests done!\n");
-+ printf("1..%d\n", test_num);
- return ksft_exit_pass();
- }