diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-22 17:08:18 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-22 17:08:18 +0100 |
commit | e7d7dc0e0e7ab68f1845e11b7574d83ac8015e0e (patch) | |
tree | 72d317ef93f50aa80af2f67c9d109e7ff59413ff | |
parent | 08ba5e5e533732546b64764231406dd6151342c1 (diff) | |
download | patches-e7d7dc0e0e7ab68f1845e11b7574d83ac8015e0e.tar.gz |
lots of patches and fixes added and made
-rw-r--r-- | c00.patch | 61 | ||||
-rw-r--r-- | c01.patch | 31 | ||||
-rw-r--r-- | c02.patch | 32 | ||||
-rw-r--r-- | c03.patch | 30 | ||||
-rw-r--r-- | c04.patch | 25 | ||||
-rw-r--r-- | c05.patch | 39 | ||||
-rw-r--r-- | c06.patch | 39 | ||||
-rw-r--r-- | c07.patch | 40 | ||||
-rw-r--r-- | c08.patch | 77 | ||||
-rw-r--r-- | c09.patch | 3 | ||||
-rw-r--r-- | class_wo.patch | 15 | ||||
-rw-r--r-- | csdio2.patch | 2 | ||||
-rw-r--r-- | e.patch | 88 | ||||
-rw-r--r-- | p21.patch | 73 | ||||
-rw-r--r-- | p22.patch | 20 | ||||
-rw-r--r-- | p23.patch | 16 | ||||
-rw-r--r-- | p24.patch | 68 | ||||
-rw-r--r-- | p26.patch | 4 | ||||
-rw-r--r-- | p28.patch | 2 | ||||
-rw-r--r-- | p29.patch | 31 | ||||
-rw-r--r-- | p30.patch | 14 | ||||
-rw-r--r-- | p31.patch | 32 | ||||
-rw-r--r-- | series | 15 |
23 files changed, 642 insertions, 115 deletions
diff --git a/c00.patch b/c00.patch new file mode 100644 index 0000000000000..116d73d3265cf --- /dev/null +++ b/c00.patch @@ -0,0 +1,61 @@ +--- + drivers/base/class.c | 15 +++++++++++++++ + include/linux/device.h | 2 ++ + 2 files changed, 17 insertions(+) + +--- a/drivers/base/class.c ++++ b/drivers/base/class.c +@@ -163,6 +163,18 @@ static void klist_class_dev_put(struct k + put_device(dev); + } + ++static int class_add_groups(struct class *cls, ++ const struct attribute_group **groups) ++{ ++ return sysfs_create_groups(&cls->p->subsys.kobj, groups); ++} ++ ++static void class_remove_groups(struct class *cls, ++ const struct attribute_group **groups) ++{ ++ return sysfs_remove_groups(&cls->p->subsys.kobj, groups); ++} ++ + int __class_register(struct class *cls, struct lock_class_key *key) + { + struct subsys_private *cp; +@@ -203,6 +215,8 @@ int __class_register(struct class *cls, + kfree(cp); + return error; + } ++ 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; +@@ -213,6 +227,7 @@ 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 +@@ -360,6 +360,7 @@ int subsys_virtual_register(struct bus_t + * @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. + * @dev_uevent: Called when a device is added, removed from this class, or a +@@ -388,6 +389,7 @@ struct class { + 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/c01.patch b/c01.patch new file mode 100644 index 0000000000000..c1f9119d7218e --- /dev/null +++ b/c01.patch @@ -0,0 +1,31 @@ +--- + drivers/base/devcoredump.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +--- a/drivers/base/devcoredump.c ++++ b/drivers/base/devcoredump.c +@@ -160,18 +160,20 @@ static ssize_t disabled_store(struct cla + + return count; + } ++static CLASS_ATTR_RW(disabled); + +-static struct class_attribute devcd_class_attrs[] = { +- __ATTR_RW(disabled), +- __ATTR_NULL ++static struct attribute *devcd_class_attrs[] = { ++ &class_attr_disabled.attr, ++ NULL, + }; ++ATTRIBUTE_GROUPS(devcd_class); + + static struct class devcd_class = { + .name = "devcoredump", + .owner = THIS_MODULE, + .dev_release = devcd_dev_release, + .dev_groups = devcd_dev_groups, +- .class_attrs = devcd_class_attrs, ++ .class_groups = devcd_class_groups, + }; + + static ssize_t devcd_readv(char *buffer, loff_t offset, size_t count, diff --git a/c02.patch b/c02.patch new file mode 100644 index 0000000000000..fc5644f843582 --- /dev/null +++ b/c02.patch @@ -0,0 +1,32 @@ +--- + drivers/base/firmware_class.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +--- a/drivers/base/firmware_class.c ++++ b/drivers/base/firmware_class.c +@@ -546,11 +546,13 @@ static ssize_t timeout_store(struct clas + + return count; + } ++static CLASS_ATTR_RW(timeout); + +-static struct class_attribute firmware_class_attrs[] = { +- __ATTR_RW(timeout), +- __ATTR_NULL ++static struct attribute *firmware_class_attrs[] = { ++ &class_attr_timeout.attr, ++ NULL, + }; ++ATTRIBUTE_GROUPS(firmware_class); + + static void fw_dev_release(struct device *dev) + { +@@ -585,7 +587,7 @@ static int firmware_uevent(struct device + + static struct class firmware_class = { + .name = "firmware", +- .class_attrs = firmware_class_attrs, ++ .class_groups = firmware_class_groups, + .dev_uevent = firmware_uevent, + .dev_release = fw_dev_release, + }; diff --git a/c03.patch b/c03.patch new file mode 100644 index 0000000000000..a5b910760d944 --- /dev/null +++ b/c03.patch @@ -0,0 +1,30 @@ +--- + 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 new file mode 100644 index 0000000000000..a80d68dee72df --- /dev/null +++ b/c04.patch @@ -0,0 +1,25 @@ +--- + 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 +@@ -3962,10 +3962,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); + +@@ -3985,7 +3981,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 new file mode 100644 index 0000000000000..38c518fbc9415 --- /dev/null +++ b/c05.patch @@ -0,0 +1,39 @@ +--- + 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 new file mode 100644 index 0000000000000..1e59c98c061b2 --- /dev/null +++ b/c06.patch @@ -0,0 +1,39 @@ +--- + drivers/block/zram/zram_drv.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +--- a/drivers/block/zram/zram_drv.c ++++ b/drivers/block/zram/zram_drv.c +@@ -1382,6 +1382,7 @@ static ssize_t hot_add_show(struct class + return ret; + return scnprintf(buf, PAGE_SIZE, "%d\n", ret); + } ++static CLASS_ATTR_RO(hot_add); + + static ssize_t hot_remove_store(struct class *class, + struct class_attribute *attr, +@@ -1411,17 +1412,19 @@ static ssize_t hot_remove_store(struct c + mutex_unlock(&zram_index_mutex); + return ret ? ret : count; + } ++static CLASS_ATTR_WO(hot_remove); + +-static struct class_attribute zram_control_class_attrs[] = { +- __ATTR_RO(hot_add), +- __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_controll_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 new file mode 100644 index 0000000000000..6915c84ea0da1 --- /dev/null +++ b/c07.patch @@ -0,0 +1,40 @@ +--- + 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/c08.patch b/c08.patch new file mode 100644 index 0000000000000..abad94ba615bc --- /dev/null +++ b/c08.patch @@ -0,0 +1,77 @@ +--- + drivers/block/osdblk.c | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +--- a/drivers/block/osdblk.c ++++ b/drivers/block/osdblk.c +@@ -468,9 +468,8 @@ static void class_osdblk_release(struct + kfree(cls); + } + +-static ssize_t class_osdblk_list(struct class *c, +- struct class_attribute *attr, +- char *data) ++static ssize_t list_show(struct class *c, struct class_attribute *attr, ++ char *data) + { + int n = 0; + struct list_head *tmp; +@@ -493,10 +492,10 @@ static ssize_t class_osdblk_list(struct + mutex_unlock(&ctl_mutex); + return n; + } ++static CLASS_ATTR_RO(list); + +-static ssize_t class_osdblk_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) + { + struct osdblk_device *osdev; + ssize_t rc; +@@ -587,11 +586,10 @@ err_out_mod: + module_put(THIS_MODULE); + return rc; + } ++static CLASS_ATTR_WO(add); + +-static ssize_t class_osdblk_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) + { + struct osdblk_device *osdev = NULL; + int target_id, rc; +@@ -635,13 +633,15 @@ static ssize_t class_osdblk_remove(struc + + return count; + } ++static CLASS_ATTR_WO(remove); + +-static struct class_attribute class_osdblk_attrs[] = { +- __ATTR(add, 0200, NULL, class_osdblk_add), +- __ATTR(remove, 0200, NULL, class_osdblk_remove), +- __ATTR(list, 0444, class_osdblk_list, NULL), +- __ATTR_NULL ++static struct attribute *class_osdblk_attrs[] = { ++ &class_attr_list.attr, ++ &class_attr_remove.attr, ++ &class_attr_list.attr, ++ NULL, + }; ++ATTRIBUTE_GROUPS(class_osdblk); + + static int osdblk_sysfs_init(void) + { +@@ -658,7 +658,7 @@ static int osdblk_sysfs_init(void) + class_osdblk->name = DRV_NAME; + class_osdblk->owner = THIS_MODULE; + class_osdblk->class_release = class_osdblk_release; +- class_osdblk->class_attrs = class_osdblk_attrs; ++ class_osdblk->class_groups = class_osdblk_groups; + + ret = class_register(class_osdblk); + if (ret) { diff --git a/c09.patch b/c09.patch new file mode 100644 index 0000000000000..da3d6ecb6e8ff --- /dev/null +++ b/c09.patch @@ -0,0 +1,3 @@ +--- + 0 files changed + diff --git a/class_wo.patch b/class_wo.patch new file mode 100644 index 0000000000000..2806ecd1ac660 --- /dev/null +++ b/class_wo.patch @@ -0,0 +1,15 @@ +--- + include/linux/device.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/linux/device.h ++++ b/include/linux/device.h +@@ -465,6 +465,8 @@ struct class_attribute { + struct class_attribute class_attr_##_name = __ATTR_RW(_name) + #define CLASS_ATTR_RO(_name) \ + struct class_attribute class_attr_##_name = __ATTR_RO(_name) ++#define CLASS_ATTR_WO(_name) \ ++ struct class_attribute class_attr_##_name = __ATTR_WO(_name) + + extern int __must_check class_create_file_ns(struct class *class, + const struct class_attribute *attr, diff --git a/csdio2.patch b/csdio2.patch index 2db68bc027d09..74fca2d76e81c 100644 --- a/csdio2.patch +++ b/csdio2.patch @@ -1232,7 +1232,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> + pr_info("%s: Exit driver module\n", CSDIO_DEV_NAME); +} + -+static char *csdio_devnode(struct device *dev, mode_t *mode) ++static char *csdio_devnode(struct device *dev, umode_t *mode) +{ + *mode = CSDIO_DEV_PERMISSIONS; + return NULL; diff --git a/e.patch b/e.patch new file mode 100644 index 0000000000000..ef62199b0ba9d --- /dev/null +++ b/e.patch @@ -0,0 +1,88 @@ +--- + drivers/staging/exfat/exfat_super.c | 40 ++++++++++++++++-------------------- + 1 file changed, 18 insertions(+), 22 deletions(-) + +--- a/drivers/staging/exfat/exfat_super.c ++++ b/drivers/staging/exfat/exfat_super.c +@@ -382,7 +382,7 @@ static long exfat_generic_ioctl(struct f + { + #if EXFAT_CONFIG_KERNEL_DEBUG + #if !(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) +- struct inode *inode = filp->f_dentry->d_inode; ++ struct inode *inode = file_inode(filp); + #endif + unsigned int flags; + #endif +@@ -838,7 +838,8 @@ out: + } + + static int exfat_rename(struct inode *old_dir, struct dentry *old_dentry, +- struct inode *new_dir, struct dentry *new_dentry) ++ struct inode *new_dir, struct dentry *new_dentry, ++ unsigned int flags) + { + struct inode *old_inode, *new_inode; + struct super_block *sb = old_dir->i_sb; +@@ -846,6 +847,9 @@ static int exfat_rename(struct inode *ol + loff_t i_pos; + int err; + ++ if (flags & ~RENAME_NOREPLACE) ++ return -EINVAL; ++ + __lock_super(sb); + + PRINTK("exfat_rename entered\n"); +@@ -1011,7 +1015,7 @@ static int exfat_setattr(struct dentry * + attr->ia_valid &= ~(ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET); + } + +- error = inode_change_ok(inode, attr); ++ error = setattr_prepare(dentry, attr); + attr->ia_valid = ia_valid; + if (error) { + return error; +@@ -1334,32 +1338,24 @@ static int exfat_write_end(struct file * + return err; + } + +-static ssize_t exfat_direct_IO(int rw, struct kiocb *iocb, +- const struct iovec *iov, +- loff_t offset, unsigned long nr_segs) ++static ssize_t exfat_direct_IO(struct kiocb *iocb, struct iov_iter *iter) + { +- struct inode *inode = iocb->ki_filp->f_mapping->host; +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34) +- struct address_space *mapping = iocb->ki_filp->f_mapping; +-#endif ++ struct file *file = iocb->ki_filep; ++ struct address_space *mapping = file->f_mapping; ++ struct inode *inode = mapping->host; ++ size_t count = iov_iter_count(iter); ++ loff_t offset = iocb->ki_pos; + ssize_t ret; + +- if (rw == WRITE) { +- if (EXFAT_I(inode)->mmu_private < (offset + iov_length(iov, nr_segs))) ++ if (iov_iter_rw(iter) == WRITE) { ++ loff_t size = offset + count ++ if (EXFAT_I(inode)->mmu_private < size) + return 0; + } +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,00) +- ret = blockdev_direct_IO(rw, iocb, inode, iov, +- offset, nr_segs, exfat_get_block); +-#else +- ret = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, +- offset, nr_segs, exfat_get_block, NULL); +-#endif ++ ret = blockdev_direct_IO(iocb, inode, iter, exfat_get_block); + +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34) +- if ((ret < 0) && (rw & WRITE)) ++ if ((ret < 0) && (iov_iter_rw(iter) == WRITE)) + exfat_write_failed(mapping, offset+iov_length(iov, nr_segs)); +-#endif + return ret; + + } diff --git a/p21.patch b/p21.patch index 55c4eef9ed6ac..a4103d1b64e46 100644 --- a/p21.patch +++ b/p21.patch @@ -1,10 +1,60 @@ --- - arch/sparc/kernel/vio.c | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) + arch/powerpc/kernel/vio.c | 12 +++++++++++- + arch/sparc/kernel/vio.c | 18 +++++++++++------- + 2 files changed, 22 insertions(+), 8 deletions(-) +--- a/arch/powerpc/kernel/vio.c ++++ b/arch/powerpc/kernel/vio.c +@@ -1537,6 +1537,7 @@ static ssize_t name_show(struct device * + { + return sprintf(buf, "%s\n", to_vio_dev(dev)->name); + } ++static DEVICE_ATTR_RO(name); + + static ssize_t devspec_show(struct device *dev, + struct device_attribute *attr, char *buf) +@@ -1545,6 +1546,7 @@ static ssize_t devspec_show(struct devic + + return sprintf(buf, "%s\n", of_node_full_name(of_node)); + } ++static DEVICE_ATTR_RO(devspec); + + static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, + char *buf) +@@ -1566,6 +1568,7 @@ static ssize_t modalias_show(struct devi + + return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp); + } ++static DEVICE_ATTR_RO(modalias); + + static struct device_attribute vio_dev_attrs[] = { + __ATTR_RO(name), +@@ -1573,6 +1576,13 @@ static struct device_attribute vio_dev_a + __ATTR_RO(modalias), + __ATTR_NULL + }; ++static struct attribute *vio_dev_attrs[] = { ++ &dev_attr_name.attr, ++ &dev_attr_devspec.attr, ++ &dev_attr_modalias.attr, ++ NULL, ++}; ++ATTRIBUTE_GROUPS(vio_dev); + + void vio_unregister_device(struct vio_dev *viodev) + { +@@ -1608,7 +1618,7 @@ static int vio_hotplug(struct device *de + + struct bus_type vio_bus_type = { + .name = "vio", +- .dev_attrs = vio_dev_attrs, ++ .dev_groups = vio_dev_groups, + .uevent = vio_hotplug, + .match = vio_bus_match, + .probe = vio_bus_probe, --- a/arch/sparc/kernel/vio.c +++ b/arch/sparc/kernel/vio.c -@@ -97,6 +97,7 @@ static ssize_t devspec_show(struct devic +@@ -105,6 +105,7 @@ static ssize_t devspec_show(struct devic return sprintf(buf, "%s\n", str); } @@ -12,27 +62,38 @@ static ssize_t type_show(struct device *dev, struct device_attribute *attr, char *buf) -@@ -104,16 +105,18 @@ static ssize_t type_show(struct device * +@@ -112,6 +113,7 @@ static ssize_t type_show(struct device * struct vio_dev *vdev = to_vio_dev(dev); return sprintf(buf, "%s\n", vdev->type); } +static DEVICE_ATTR_RO(type); + static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, + char *buf) +@@ -120,17 +122,19 @@ static ssize_t modalias_show(struct devi + + return sprintf(buf, "vio:T%sS%s\n", vdev->type, vdev->compat); + } ++static DEVICE_ATTR_RO(modalias); + -static struct device_attribute vio_dev_attrs[] = { - __ATTR_RO(devspec), - __ATTR_RO(type), +- __ATTR_RO(modalias), - __ATTR_NULL +-}; +static struct attribute *vio_dev_attrs[] = { + &dev_attr_devspec.attr, + &dev_attr_type.attr, ++ &dev_attr_modalias.attr, + NULL, - }; ++ }; +ATTRIBUTE_GROUPS(vio_dev); static struct bus_type vio_bus_type = { .name = "vio", - .dev_attrs = vio_dev_attrs, + .dev_groups = vio_dev_groups, + .uevent = vio_hotplug, .match = vio_bus_match, .probe = vio_device_probe, - .remove = vio_device_remove, diff --git a/p22.patch b/p22.patch index ae6f4fda0f85b..d64c4e91a6c22 100644 --- a/p22.patch +++ b/p22.patch @@ -1,10 +1,18 @@ --- - drivers/amba/bus.c | 22 ++++++++++------------ - 1 file changed, 10 insertions(+), 12 deletions(-) + drivers/amba/bus.c | 25 ++++++++++++------------- + 1 file changed, 12 insertions(+), 13 deletions(-) --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c -@@ -65,24 +65,22 @@ static ssize_t name##_show(struct device +@@ -105,6 +105,7 @@ static ssize_t driver_override_store(str + + 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 { \ struct amba_device *dev = to_amba_device(_dev); \ return sprintf(buf, fmt, arg); \ @@ -14,7 +22,7 @@ -amba_attr_func(name,fmt,arg) \ -static DEVICE_ATTR(name, S_IRUGO, name##_show, NULL) +} \ -+static DEVICE_ATTR_RO(name); ++static DEVICE_ATTR_RO(name) amba_attr_func(id, "%08x\n", dev->periphid); -amba_attr(irq0, "%u\n", dev->irq[0]); @@ -28,17 +36,19 @@ -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 /* -@@ -137,7 +135,7 @@ static const struct dev_pm_ops amba_pm = +@@ -192,7 +191,7 @@ static const struct dev_pm_ops amba_pm = */ struct bus_type amba_bustype = { .name = "amba", diff --git a/p23.patch b/p23.patch index 6e09808cf5201..e25525418e841 100644 --- a/p23.patch +++ b/p23.patch @@ -1,11 +1,11 @@ --- - drivers/rpmsg/virtio_rpmsg_bus.c | 21 ++++++++++++--------- + drivers/rpmsg/rpmsg_core.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) ---- a/drivers/rpmsg/virtio_rpmsg_bus.c -+++ b/drivers/rpmsg/virtio_rpmsg_bus.c -@@ -125,7 +125,8 @@ field##_show(struct device *dev, \ - struct rpmsg_channel *rpdev = to_rpmsg_channel(dev); \ +--- a/drivers/rpmsg/rpmsg_core.c ++++ b/drivers/rpmsg/rpmsg_core.c +@@ -275,7 +275,8 @@ field##_show(struct device *dev, \ + struct rpmsg_device *rpdev = to_rpmsg_device(dev); \ \ return sprintf(buf, format_string, rpdev->path); \ -} @@ -14,7 +14,7 @@ /* for more info, see Documentation/ABI/testing/sysfs-bus-rpmsg */ rpmsg_show_attr(name, id.name, "%s\n"); -@@ -148,15 +149,17 @@ static ssize_t modalias_show(struct devi +@@ -290,15 +291,17 @@ static ssize_t modalias_show(struct devi return sprintf(buf, RPMSG_DEVICE_MODALIAS_FMT "\n", rpdev->id.name); } @@ -38,8 +38,8 @@ +ATTRIBUTE_GROUPS(rpmsg_dev); /* rpmsg devices and drivers are matched using the service name */ - static inline int rpmsg_id_match(const struct rpmsg_channel *rpdev, -@@ -427,7 +430,7 @@ static int rpmsg_dev_remove(struct devic + static inline int rpmsg_id_match(const struct rpmsg_device *rpdev, +@@ -393,7 +396,7 @@ static int rpmsg_dev_remove(struct devic static struct bus_type rpmsg_bus = { .name = "rpmsg", .match = rpmsg_dev_match, diff --git a/p24.patch b/p24.patch deleted file mode 100644 index a3030e1e1df79..0000000000000 --- a/p24.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- - sound/aoa/soundbus/core.c | 2 +- - sound/aoa/soundbus/soundbus.h | 2 +- - sound/aoa/soundbus/sysfs.c | 23 +++++++++++++++++------ - 3 files changed, 19 insertions(+), 8 deletions(-) - ---- a/sound/aoa/soundbus/core.c -+++ b/sound/aoa/soundbus/core.c -@@ -160,7 +160,7 @@ static struct bus_type soundbus_bus_type - .suspend = soundbus_device_suspend, - .resume = soundbus_device_resume, - #endif -- .dev_attrs = soundbus_dev_attrs, -+ .dev_groups = soundbus_dev_groups, - }; - - int soundbus_add_one(struct soundbus_dev *dev) ---- a/sound/aoa/soundbus/soundbus.h -+++ b/sound/aoa/soundbus/soundbus.h -@@ -199,6 +199,6 @@ struct soundbus_driver { - extern int soundbus_register_driver(struct soundbus_driver *drv); - extern void soundbus_unregister_driver(struct soundbus_driver *drv); - --extern struct device_attribute soundbus_dev_attrs[]; -+extern const struct attribute_group *soundbus_dev_groups[]; - - #endif /* __SOUNDBUS_H */ ---- a/sound/aoa/soundbus/sysfs.c -+++ b/sound/aoa/soundbus/sysfs.c -@@ -10,7 +10,8 @@ field##_show (struct device *dev, struct - { \ - struct soundbus_dev *mdev = to_soundbus_device (dev); \ - return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \ --} -+} \ -+static DEVICE_ATTR_RO(field); - - static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, - char *buf) -@@ -30,13 +31,23 @@ static ssize_t modalias_show(struct devi - - return length; - } -+static DEVICE_ATTR_RO(modalias); - - soundbus_config_of_attr (name, "%s\n"); - soundbus_config_of_attr (type, "%s\n"); - --struct device_attribute soundbus_dev_attrs[] = { -- __ATTR_RO(name), -- __ATTR_RO(type), -- __ATTR_RO(modalias), -- __ATTR_NULL -+static struct attribute *soundbus_dev_attrs[] = { -+ &dev_attr_name.attr, -+ &dev_attr_type.attr, -+ &dev_attr_modalias.attr, -+ NULL, -+}; -+ -+static const struct attribute_group soundbus_dev_group = { -+ .attrs = soundbus_dev_attrs, -+}; -+ -+const struct attribute_group *soundbus_dev_groups[] = { -+ &soundbus_dev_group, -+ NULL, - }; diff --git a/p26.patch b/p26.patch index 63cc6492ca078..eac8789f6c314 100644 --- a/p26.patch +++ b/p26.patch @@ -5,7 +5,7 @@ --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c -@@ -134,7 +134,7 @@ static int macio_device_resume(struct de +@@ -133,7 +133,7 @@ static int macio_device_resume(struct de return 0; } @@ -14,7 +14,7 @@ struct bus_type macio_bus_type = { .name = "macio", -@@ -145,7 +145,7 @@ struct bus_type macio_bus_type = { +@@ -144,7 +144,7 @@ struct bus_type macio_bus_type = { .shutdown = macio_device_shutdown, .suspend = macio_device_suspend, .resume = macio_device_resume, diff --git a/p28.patch b/p28.patch index 8b4f1f5da310f..bf5e3f578ab80 100644 --- a/p28.patch +++ b/p28.patch @@ -26,7 +26,7 @@ } +static DEVICE_ATTR_RO(modalias); --struct device_attribute ibmebus_bus_device_attrs[] = { +-static struct device_attribute ibmebus_bus_device_attrs[] = { - __ATTR_RO(devspec), - __ATTR_RO(name), - __ATTR_RO(modalias), diff --git a/p29.patch b/p29.patch index 01c6a81e00d07..0d004f2d7ac5f 100644 --- a/p29.patch +++ b/p29.patch @@ -1,6 +1,6 @@ --- - arch/powerpc/kernel/vio.c | 50 ++++++++++++++++++++++++++-------------------- - 1 file changed, 29 insertions(+), 21 deletions(-) + arch/powerpc/kernel/vio.c | 43 ++++++++++++++++++++++--------------------- + 1 file changed, 22 insertions(+), 21 deletions(-) --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c @@ -77,31 +77,16 @@ vio_bus_type.bus_groups = vio_bus_groups; } #else /* CONFIG_PPC_SMLPAR */ -@@ -1562,12 +1569,13 @@ static ssize_t modalias_show(struct devi - return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp); +@@ -1570,12 +1577,6 @@ static ssize_t modalias_show(struct devi } + static DEVICE_ATTR_RO(modalias); -static struct device_attribute vio_dev_attrs[] = { - __ATTR_RO(name), - __ATTR_RO(devspec), - __ATTR_RO(modalias), - __ATTR_NULL -+static struct attribute *vio_dev_attrs[] = { -+ &dev_attr_name.attr, -+ &dev_attr_devspec.attr, -+ &dev_attr_modalias.attr, -+ NULL, - }; -+ATTRIBUTE_GROUPS(vio_dev); - - void vio_unregister_device(struct vio_dev *viodev) - { -@@ -1603,7 +1611,7 @@ static int vio_hotplug(struct device *de - - struct bus_type vio_bus_type = { - .name = "vio", -- .dev_attrs = vio_dev_attrs, -+ .dev_groups = vio_dev_groups, - .uevent = vio_hotplug, - .match = vio_bus_match, - .probe = vio_bus_probe, +-}; + static struct attribute *vio_dev_attrs[] = { + &dev_attr_name.attr, + &dev_attr_devspec.attr, diff --git a/p30.patch b/p30.patch new file mode 100644 index 0000000000000..30164305ce606 --- /dev/null +++ b/p30.patch @@ -0,0 +1,14 @@ +--- + drivers/hwtracing/intel_th/core.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/hwtracing/intel_th/core.c ++++ b/drivers/hwtracing/intel_th/core.c +@@ -136,7 +136,6 @@ static int intel_th_remove(struct device + + static struct bus_type intel_th_bus = { + .name = "intel_th", +- .dev_attrs = NULL, + .match = intel_th_match, + .probe = intel_th_probe, + .remove = intel_th_remove, diff --git a/p31.patch b/p31.patch new file mode 100644 index 0000000000000..ce0c9da626fb3 --- /dev/null +++ b/p31.patch @@ -0,0 +1,32 @@ +--- + drivers/hid/intel-ish-hid/ishtp/bus.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +--- a/drivers/hid/intel-ish-hid/ishtp/bus.c ++++ b/drivers/hid/intel-ish-hid/ishtp/bus.c +@@ -321,11 +321,13 @@ static ssize_t modalias_show(struct devi + len = snprintf(buf, PAGE_SIZE, "ishtp:%s\n", dev_name(dev)); + return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len; + } ++static DEVICE_ATTR_RO(modalias); + +-static struct device_attribute ishtp_cl_dev_attrs[] = { +- __ATTR_RO(modalias), +- __ATTR_NULL, ++static struct attribute *ishtp_cl_dev_attrs[] = { ++ &dev_attr_modalias.attr, ++ NULL, + }; ++ATTRIBUTE_GROUPS(ishtp_cl_dev); + + static int ishtp_cl_uevent(struct device *dev, struct kobj_uevent_env *env) + { +@@ -346,7 +348,7 @@ static const struct dev_pm_ops ishtp_cl_ + + static struct bus_type ishtp_cl_bus_type = { + .name = "ishtp", +- .dev_attrs = ishtp_cl_dev_attrs, ++ .dev_groups = ishtp_cl_dev_groups, + .probe = ishtp_cl_device_probe, + .remove = ishtp_cl_device_remove, + .pm = &ishtp_cl_bus_dev_pm_ops, @@ -33,6 +33,7 @@ staging-exfat-kuid-fixes.patch ## dev_groups to struct class work # # +e.patch simulate-fake-fn-key-on-ps-2-keyboards-w-o-one-eg.-chromebook-pixel.patch # ##gregkh/gkh-version.patch @@ -45,7 +46,6 @@ p20.patch p21.patch p22.patch p23.patch -p24.patch p25.patch p26.patch p27.patch @@ -67,3 +67,16 @@ p29.patch # # # +p30.patch +p31.patch +c00.patch +c01.patch +c02.patch +c03.patch +c04.patch +c05.patch +c06.patch +class_wo.patch +c07.patch +c08.patch +c09.patch |