diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-05 17:33:03 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-05 17:33:03 -0700 |
commit | e1adefb1daf4ccaa49432aa8ed5db2abe2abb0aa (patch) | |
tree | e6ca55bb172383b609d6065f21b2dbc4fb681d6e | |
parent | 1d0da63c6781741b6e9cc9558b13918c09445903 (diff) | |
download | patches-e1adefb1daf4ccaa49432aa8ed5db2abe2abb0aa.tar.gz |
more patches
-rw-r--r-- | i01.patch | 2 | ||||
-rw-r--r-- | p01.patch | 205 | ||||
-rw-r--r-- | p02.patch | 30 | ||||
-rw-r--r-- | p03.patch | 109 | ||||
-rw-r--r-- | p04.patch | 86 | ||||
-rw-r--r-- | p05.patch | 42 | ||||
-rw-r--r-- | series | 5 |
7 files changed, 478 insertions, 1 deletions
diff --git a/i01.patch b/i01.patch index 900b59e42b45ba..49e788303055f2 100644 --- a/i01.patch +++ b/i01.patch @@ -78,7 +78,7 @@ + .attrs = ide_attrs, +}; + -+const struct attribute_group *ide_attr_groups[] = { ++const struct attribute_group *ide_dev_groups[] = { + &ide_attr_group, + NULL, }; diff --git a/p01.patch b/p01.patch new file mode 100644 index 00000000000000..f535a900fc87b6 --- /dev/null +++ b/p01.patch @@ -0,0 +1,205 @@ +--- + drivers/pci/pci-driver.c | 2 - + drivers/pci/pci-sysfs.c | 73 +++++++++++++++++++++++++++++------------------ + drivers/pci/pci.h | 2 - + 3 files changed, 48 insertions(+), 29 deletions(-) + +--- a/drivers/pci/pci-driver.c ++++ b/drivers/pci/pci-driver.c +@@ -1319,7 +1319,7 @@ struct bus_type pci_bus_type = { + .probe = pci_device_probe, + .remove = pci_device_remove, + .shutdown = pci_device_shutdown, +- .dev_attrs = pci_dev_attrs, ++ .dev_groups = pci_dev_groups, + .bus_groups = pci_bus_groups, + .drv_groups = pci_drv_groups, + .pm = PCI_PM_OPS_PTR, +--- a/drivers/pci/pci-sysfs.c ++++ b/drivers/pci/pci-sysfs.c +@@ -42,7 +42,8 @@ field##_show(struct device *dev, struct + \ + pdev = to_pci_dev (dev); \ + return sprintf (buf, format_string, pdev->field); \ +-} ++} \ ++static DEVICE_ATTR_RO(field) + + pci_config_attr(vendor, "0x%04x\n"); + pci_config_attr(device, "0x%04x\n"); +@@ -73,6 +74,7 @@ static ssize_t broken_parity_status_stor + + return count; + } ++static DEVICE_ATTR_RW(broken_parity_status); + + static ssize_t local_cpus_show(struct device *dev, + struct device_attribute *attr, char *buf) +@@ -91,7 +93,7 @@ static ssize_t local_cpus_show(struct de + buf[len] = '\0'; + return len; + } +- ++static DEVICE_ATTR_RO(local_cpus); + + static ssize_t local_cpulist_show(struct device *dev, + struct device_attribute *attr, char *buf) +@@ -110,6 +112,7 @@ static ssize_t local_cpulist_show(struct + buf[len] = '\0'; + return len; + } ++static DEVICE_ATTR_RO(local_cpulist); + + /* + * PCI Bus Class Devices +@@ -170,6 +173,7 @@ resource_show(struct device * dev, struc + } + return (str - buf); + } ++static DEVICE_ATTR_RO(resource); + + static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf) + { +@@ -181,10 +185,11 @@ static ssize_t modalias_show(struct devi + (u8)(pci_dev->class >> 16), (u8)(pci_dev->class >> 8), + (u8)(pci_dev->class)); + } ++static DEVICE_ATTR_RO(modalias); + +-static ssize_t is_enabled_store(struct device *dev, +- struct device_attribute *attr, const char *buf, +- size_t count) ++static ssize_t enabled_store(struct device *dev, ++ struct device_attribute *attr, const char *buf, ++ size_t count) + { + struct pci_dev *pdev = to_pci_dev(dev); + unsigned long val; +@@ -208,14 +213,15 @@ static ssize_t is_enabled_store(struct d + return result < 0 ? result : count; + } + +-static ssize_t is_enabled_show(struct device *dev, +- struct device_attribute *attr, char *buf) ++static ssize_t enabled_show(struct device *dev, ++ struct device_attribute *attr, char *buf) + { + struct pci_dev *pdev; + + pdev = to_pci_dev (dev); + return sprintf (buf, "%u\n", atomic_read(&pdev->enable_cnt)); + } ++static DEVICE_ATTR_RW(enabled); + + #ifdef CONFIG_NUMA + static ssize_t +@@ -223,6 +229,7 @@ numa_node_show(struct device *dev, struc + { + return sprintf (buf, "%d\n", dev->numa_node); + } ++static DEVICE_ATTR_RO(numa_node); + #endif + + static ssize_t +@@ -232,6 +239,7 @@ dma_mask_bits_show(struct device *dev, s + + return sprintf (buf, "%d\n", fls64(pdev->dma_mask)); + } ++static DEVICE_ATTR_RO(dma_mask_bits); + + static ssize_t + consistent_dma_mask_bits_show(struct device *dev, struct device_attribute *attr, +@@ -239,6 +247,7 @@ consistent_dma_mask_bits_show(struct dev + { + return sprintf (buf, "%d\n", fls64(dev->coherent_dma_mask)); + } ++static DEVICE_ATTR_RO(consistent_dma_mask_bits); + + static ssize_t + msi_bus_show(struct device *dev, struct device_attribute *attr, char *buf) +@@ -283,6 +292,7 @@ msi_bus_store(struct device *dev, struct + + return count; + } ++static DEVICE_ATTR_RW(msi_bus); + + static DEFINE_MUTEX(pci_remove_rescan_mutex); + static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf, +@@ -414,6 +424,7 @@ static ssize_t d3cold_allowed_show(struc + struct pci_dev *pdev = to_pci_dev(dev); + return sprintf (buf, "%u\n", pdev->d3cold_allowed); + } ++static DEVICE_ATTR_RW(d3cold_allowed); + #endif + + #ifdef CONFIG_PCI_IOV +@@ -499,30 +510,38 @@ static struct device_attribute sriov_num + sriov_numvfs_show, sriov_numvfs_store); + #endif /* CONFIG_PCI_IOV */ + +-struct device_attribute pci_dev_attrs[] = { +- __ATTR_RO(resource), +- __ATTR_RO(vendor), +- __ATTR_RO(device), +- __ATTR_RO(subsystem_vendor), +- __ATTR_RO(subsystem_device), +- __ATTR_RO(class), +- __ATTR_RO(irq), +- __ATTR_RO(local_cpus), +- __ATTR_RO(local_cpulist), +- __ATTR_RO(modalias), ++struct attribute *pci_dev_attrs[] = { ++ &dev_attr_resource.attr, ++ &dev_attr_vendor.attr, ++ &dev_attr_device.attr, ++ &dev_attr_subsystem_vendor.attr, ++ &dev_attr_subsystem_device.attr, ++ &dev_attr_class.attr, ++ &dev_attr_irq.attr, ++ &dev_attr_local_cpus.attr, ++ &dev_attr_local_cpulist.attr, ++ &dev_attr_modalias.attr, + #ifdef CONFIG_NUMA +- __ATTR_RO(numa_node), ++ &dev_attr_numa_node.attr, + #endif +- __ATTR_RO(dma_mask_bits), +- __ATTR_RO(consistent_dma_mask_bits), +- __ATTR(enable, 0600, is_enabled_show, is_enabled_store), +- __ATTR(broken_parity_status,(S_IRUGO|S_IWUSR), +- broken_parity_status_show,broken_parity_status_store), +- __ATTR(msi_bus, 0644, msi_bus_show, msi_bus_store), ++ &dev_attr_dma_mask_bits.attr, ++ &dev_attr_consistent_dma_mask_bits.attr, ++ &dev_attr_enabled.attr, ++ &dev_attr_broken_parity_status.attr, ++ &dev_attr_msi_bus.attr, + #if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI) +- __ATTR(d3cold_allowed, 0644, d3cold_allowed_show, d3cold_allowed_store), ++ &dev_attr_d3cold_allowed.attr, + #endif +- __ATTR_NULL, ++ NULL, ++}; ++ ++static const struct attribute_group pci_dev_group = { ++ .attrs = pci_dev_attrs, ++}; ++ ++const struct attribute_group *pci_dev_groups[] = { ++ &pci_dev_group, ++ NULL, + }; + + static struct attribute *pcibus_attrs[] = { +--- a/drivers/pci/pci.h ++++ b/drivers/pci/pci.h +@@ -150,7 +150,7 @@ static inline int pci_no_d1d2(struct pci + return (dev->no_d1d2 || parent_dstates); + + } +-extern struct device_attribute pci_dev_attrs[]; ++extern const struct attribute_group *pci_dev_groups[]; + extern const struct attribute_group *pcibus_groups[]; + extern struct device_type pci_dev_type; + extern const struct attribute_group *pci_bus_groups[]; diff --git a/p02.patch b/p02.patch new file mode 100644 index 00000000000000..feb394858babd7 --- /dev/null +++ b/p02.patch @@ -0,0 +1,30 @@ +--- + drivers/net/phy/mdio_bus.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +--- a/drivers/net/phy/mdio_bus.c ++++ b/drivers/net/phy/mdio_bus.c +@@ -438,17 +438,19 @@ phy_id_show(struct device *dev, struct d + + return sprintf(buf, "0x%.8lx\n", (unsigned long)phydev->phy_id); + } ++static DEVICE_ATTR_RO(phy_id); + +-static struct device_attribute mdio_dev_attrs[] = { +- __ATTR_RO(phy_id), +- __ATTR_NULL ++static struct attribute *mdio_dev_attrs[] = { ++ &dev_attr_phy_id.attr, ++ NULL, + }; ++ATTRIBUTE_GROUPS(mdio_dev); + + struct bus_type mdio_bus_type = { + .name = "mdio_bus", + .match = mdio_bus_match, + .pm = MDIO_BUS_PM_OPS, +- .dev_attrs = mdio_dev_attrs, ++ .dev_groups = mdio_dev_groups, + }; + EXPORT_SYMBOL(mdio_bus_type); + diff --git a/p03.patch b/p03.patch new file mode 100644 index 00000000000000..94398ea91ee915 --- /dev/null +++ b/p03.patch @@ -0,0 +1,109 @@ +--- + drivers/pnp/base.h | 2 +- + drivers/pnp/driver.c | 2 +- + drivers/pnp/interface.c | 43 ++++++++++++++++++++++++++----------------- + 3 files changed, 28 insertions(+), 19 deletions(-) + +--- a/drivers/pnp/base.h ++++ b/drivers/pnp/base.h +@@ -4,7 +4,7 @@ + */ + + extern spinlock_t pnp_lock; +-extern struct device_attribute pnp_interface_attrs[]; ++extern const struct attribute_group *pnp_dev_groups[]; + void *pnp_alloc(long size); + + int pnp_register_protocol(struct pnp_protocol *protocol); +--- a/drivers/pnp/driver.c ++++ b/drivers/pnp/driver.c +@@ -233,7 +233,7 @@ struct bus_type pnp_bus_type = { + .remove = pnp_device_remove, + .shutdown = pnp_device_shutdown, + .pm = &pnp_bus_dev_pm_ops, +- .dev_attrs = pnp_interface_attrs, ++ .dev_groups = pnp_dev_groups, + }; + + int pnp_register_driver(struct pnp_driver *drv) +--- a/drivers/pnp/interface.c ++++ b/drivers/pnp/interface.c +@@ -203,8 +203,8 @@ static void pnp_print_option(pnp_info_bu + } + } + +-static ssize_t pnp_show_options(struct device *dmdev, +- struct device_attribute *attr, char *buf) ++static ssize_t options_show(struct device *dmdev, struct device_attribute *attr, ++ char *buf) + { + struct pnp_dev *dev = to_pnp_dev(dmdev); + pnp_info_buffer_t *buffer; +@@ -241,10 +241,10 @@ static ssize_t pnp_show_options(struct d + kfree(buffer); + return ret; + } ++static DEVICE_ATTR_RO(options); + +-static ssize_t pnp_show_current_resources(struct device *dmdev, +- struct device_attribute *attr, +- char *buf) ++static ssize_t resources_show(struct device *dmdev, ++ struct device_attribute *attr, char *buf) + { + struct pnp_dev *dev = to_pnp_dev(dmdev); + pnp_info_buffer_t *buffer; +@@ -331,9 +331,9 @@ static char *pnp_get_resource_value(char + return buf; + } + +-static ssize_t pnp_set_current_resources(struct device *dmdev, +- struct device_attribute *attr, +- const char *ubuf, size_t count) ++static ssize_t resources_store(struct device *dmdev, ++ struct device_attribute *attr, const char *ubuf, ++ size_t count) + { + struct pnp_dev *dev = to_pnp_dev(dmdev); + char *buf = (void *)ubuf; +@@ -434,9 +434,10 @@ done: + return retval; + return count; + } ++static DEVICE_ATTR_RW(resources); + +-static ssize_t pnp_show_current_ids(struct device *dmdev, +- struct device_attribute *attr, char *buf) ++static ssize_t id_show(struct device *dmdev, struct device_attribute *attr, ++ char *buf) + { + char *str = buf; + struct pnp_dev *dev = to_pnp_dev(dmdev); +@@ -448,12 +449,20 @@ static ssize_t pnp_show_current_ids(stru + } + return (str - buf); + } ++static DEVICE_ATTR_RO(id); + +-struct device_attribute pnp_interface_attrs[] = { +- __ATTR(resources, S_IRUGO | S_IWUSR, +- pnp_show_current_resources, +- pnp_set_current_resources), +- __ATTR(options, S_IRUGO, pnp_show_options, NULL), +- __ATTR(id, S_IRUGO, pnp_show_current_ids, NULL), +- __ATTR_NULL, ++static struct attribute *pnp_dev_attrs[] = { ++ &dev_attr_resources.attr, ++ &dev_attr_options.attr, ++ &dev_attr_id.attr, ++ NULL, ++}; ++ ++static const struct attribute_group pnp_dev_group = { ++ .attrs = pnp_dev_attrs, ++}; ++ ++const struct attribute_group *pnp_dev_groups[] = { ++ &pnp_dev_group, ++ NULL, + }; diff --git a/p04.patch b/p04.patch new file mode 100644 index 00000000000000..c1146aea5f6a41 --- /dev/null +++ b/p04.patch @@ -0,0 +1,86 @@ +--- + drivers/mmc/core/bus.c | 12 +++++++----- + drivers/mmc/core/sdio_bus.c | 19 +++++++++++-------- + 2 files changed, 18 insertions(+), 13 deletions(-) + +--- a/drivers/mmc/core/bus.c ++++ b/drivers/mmc/core/bus.c +@@ -27,7 +27,7 @@ + + #define to_mmc_driver(d) container_of(d, struct mmc_driver, drv) + +-static ssize_t mmc_type_show(struct device *dev, ++static ssize_t type_show(struct device *dev, + struct device_attribute *attr, char *buf) + { + struct mmc_card *card = mmc_dev_to_card(dev); +@@ -45,11 +45,13 @@ static ssize_t mmc_type_show(struct devi + return -EFAULT; + } + } ++static DEVICE_ATTR_RO(type); + +-static struct device_attribute mmc_dev_attrs[] = { +- __ATTR(type, S_IRUGO, mmc_type_show, NULL), +- __ATTR_NULL, ++static struct attribute *mmc_dev_attrs[] = { ++ &dev_attr_type.attr, ++ NULL, + }; ++ATTRIBUTE_GROUPS(mmc_dev); + + /* + * This currently matches any MMC driver to any MMC card - drivers +@@ -218,7 +220,7 @@ static const struct dev_pm_ops mmc_bus_p + + static struct bus_type mmc_bus_type = { + .name = "mmc", +- .dev_attrs = mmc_dev_attrs, ++ .dev_groups = mmc_dev_groups, + .match = mmc_bus_match, + .uevent = mmc_bus_uevent, + .probe = mmc_bus_probe, +--- a/drivers/mmc/core/sdio_bus.c ++++ b/drivers/mmc/core/sdio_bus.c +@@ -34,7 +34,8 @@ field##_show(struct device *dev, struct + \ + func = dev_to_sdio_func (dev); \ + return sprintf (buf, format_string, func->field); \ +-} ++} \ ++static DEVICE_ATTR_RO(field) + + sdio_config_attr(class, "0x%02x\n"); + sdio_config_attr(vendor, "0x%04x\n"); +@@ -47,14 +48,16 @@ static ssize_t modalias_show(struct devi + return sprintf(buf, "sdio:c%02Xv%04Xd%04X\n", + func->class, func->vendor, func->device); + } ++static DEVICE_ATTR_RO(modalias); + +-static struct device_attribute sdio_dev_attrs[] = { +- __ATTR_RO(class), +- __ATTR_RO(vendor), +- __ATTR_RO(device), +- __ATTR_RO(modalias), +- __ATTR_NULL, ++static struct attribute *sdio_dev_attrs[] = { ++ &dev_attr_class.attr, ++ &dev_attr_vendor.attr, ++ &dev_attr_device.attr, ++ &dev_attr_modalias.attr, ++ NULL, + }; ++ATTRIBUTE_GROUPS(sdio_dev); + + static const struct sdio_device_id *sdio_match_one(struct sdio_func *func, + const struct sdio_device_id *id) +@@ -225,7 +228,7 @@ static const struct dev_pm_ops sdio_bus_ + + static struct bus_type sdio_bus_type = { + .name = "sdio", +- .dev_attrs = sdio_dev_attrs, ++ .dev_groups = sdio_dev_groups, + .match = sdio_bus_match, + .uevent = sdio_bus_uevent, + .probe = sdio_bus_probe, diff --git a/p05.patch b/p05.patch new file mode 100644 index 00000000000000..a7760fe0fedc28 --- /dev/null +++ b/p05.patch @@ -0,0 +1,42 @@ +--- + drivers/uwb/umc-bus.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +--- a/drivers/uwb/umc-bus.c ++++ b/drivers/uwb/umc-bus.c +@@ -201,6 +201,7 @@ static ssize_t capability_id_show(struct + + return sprintf(buf, "0x%02x\n", umc->cap_id); + } ++static DEVICE_ATTR_RO(capability_id); + + static ssize_t version_show(struct device *dev, struct device_attribute *attr, char *buf) + { +@@ -208,12 +209,14 @@ static ssize_t version_show(struct devic + + return sprintf(buf, "0x%04x\n", umc->version); + } ++static DEVICE_ATTR_RO(version); + +-static struct device_attribute umc_dev_attrs[] = { +- __ATTR_RO(capability_id), +- __ATTR_RO(version), +- __ATTR_NULL, ++static struct attribute *umc_dev_attrs[] = { ++ &dev_attr_capability_id.attr, ++ &dev_attr_version.attr, ++ NULL, + }; ++ATTRIBUTE_GROUPS(umc_dev); + + struct bus_type umc_bus_type = { + .name = "umc", +@@ -222,7 +225,7 @@ struct bus_type umc_bus_type = { + .remove = umc_device_remove, + .suspend = umc_device_suspend, + .resume = umc_device_resume, +- .dev_attrs = umc_dev_attrs, ++ .dev_groups = umc_dev_groups, + }; + EXPORT_SYMBOL_GPL(umc_bus_type); + @@ -58,4 +58,9 @@ s01.patch s02.patch i01.patch i02.patch +p01.patch +p02.patch +p03.patch +p04.patch +p05.patch qlcnic_sysfs.patch |