diff options
30 files changed, 39 insertions, 39 deletions
diff --git a/block/genhd.c b/block/genhd.c index 5b76bf55d05..2ad91ddad8e 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
| @@ -903,7 +903,7 @@ static struct attribute_group disk_attr_group = { | |||
| 903 | .attrs = disk_attrs, | 903 | .attrs = disk_attrs, |
| 904 | }; | 904 | }; |
| 905 | 905 | ||
| 906 | static struct attribute_group *disk_attr_groups[] = { | 906 | static const struct attribute_group *disk_attr_groups[] = { |
| 907 | &disk_attr_group, | 907 | &disk_attr_group, |
| 908 | NULL | 908 | NULL |
| 909 | }; | 909 | }; |
diff --git a/drivers/base/core.c b/drivers/base/core.c index 99dfe96fffc..a992985d1fa 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
| @@ -341,7 +341,7 @@ static void device_remove_attributes(struct device *dev, | |||
| 341 | } | 341 | } |
| 342 | 342 | ||
| 343 | static int device_add_groups(struct device *dev, | 343 | static int device_add_groups(struct device *dev, |
| 344 | struct attribute_group **groups) | 344 | const struct attribute_group **groups) |
| 345 | { | 345 | { |
| 346 | int error = 0; | 346 | int error = 0; |
| 347 | int i; | 347 | int i; |
| @@ -361,7 +361,7 @@ static int device_add_groups(struct device *dev, | |||
| 361 | } | 361 | } |
| 362 | 362 | ||
| 363 | static void device_remove_groups(struct device *dev, | 363 | static void device_remove_groups(struct device *dev, |
| 364 | struct attribute_group **groups) | 364 | const struct attribute_group **groups) |
| 365 | { | 365 | { |
| 366 | int i; | 366 | int i; |
| 367 | 367 | ||
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 8ae0f63602e..ed2ebd3c287 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c | |||
| @@ -181,7 +181,7 @@ void put_driver(struct device_driver *drv) | |||
| 181 | EXPORT_SYMBOL_GPL(put_driver); | 181 | EXPORT_SYMBOL_GPL(put_driver); |
| 182 | 182 | ||
| 183 | static int driver_add_groups(struct device_driver *drv, | 183 | static int driver_add_groups(struct device_driver *drv, |
| 184 | struct attribute_group **groups) | 184 | const struct attribute_group **groups) |
| 185 | { | 185 | { |
| 186 | int error = 0; | 186 | int error = 0; |
| 187 | int i; | 187 | int i; |
| @@ -201,7 +201,7 @@ static int driver_add_groups(struct device_driver *drv, | |||
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | static void driver_remove_groups(struct device_driver *drv, | 203 | static void driver_remove_groups(struct device_driver *drv, |
| 204 | struct attribute_group **groups) | 204 | const struct attribute_group **groups) |
| 205 | { | 205 | { |
| 206 | int i; | 206 | int i; |
| 207 | 207 | ||
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 0589dfbbd7d..d8372b43282 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
| @@ -572,7 +572,7 @@ static struct attribute_group cciss_dev_attr_group = { | |||
| 572 | .attrs = cciss_dev_attrs, | 572 | .attrs = cciss_dev_attrs, |
| 573 | }; | 573 | }; |
| 574 | 574 | ||
| 575 | static struct attribute_group *cciss_dev_attr_groups[] = { | 575 | static const struct attribute_group *cciss_dev_attr_groups[] = { |
| 576 | &cciss_dev_attr_group, | 576 | &cciss_dev_attr_group, |
| 577 | NULL | 577 | NULL |
| 578 | }; | 578 | }; |
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index 97e656af2d2..9d0dfcbe2c1 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c | |||
| @@ -312,7 +312,7 @@ static void init_fw_attribute_group(struct device *dev, | |||
| 312 | group->groups[0] = &group->group; | 312 | group->groups[0] = &group->group; |
| 313 | group->groups[1] = NULL; | 313 | group->groups[1] = NULL; |
| 314 | group->group.attrs = group->attrs; | 314 | group->group.attrs = group->attrs; |
| 315 | dev->groups = group->groups; | 315 | dev->groups = (const struct attribute_group **) group->groups; |
| 316 | } | 316 | } |
| 317 | 317 | ||
| 318 | static ssize_t modalias_show(struct device *dev, | 318 | static ssize_t modalias_show(struct device *dev, |
diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c index 5a76d056b9d..dbdf6fadfc7 100644 --- a/drivers/firmware/dmi-id.c +++ b/drivers/firmware/dmi-id.c | |||
| @@ -139,7 +139,7 @@ static struct attribute_group sys_dmi_attribute_group = { | |||
| 139 | .attrs = sys_dmi_attributes, | 139 | .attrs = sys_dmi_attributes, |
| 140 | }; | 140 | }; |
| 141 | 141 | ||
| 142 | static struct attribute_group* sys_dmi_attribute_groups[] = { | 142 | static const struct attribute_group* sys_dmi_attribute_groups[] = { |
| 143 | &sys_dmi_attribute_group, | 143 | &sys_dmi_attribute_group, |
| 144 | NULL | 144 | NULL |
| 145 | }; | 145 | }; |
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 5b635aa5947..fb2d83c5bf0 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
| @@ -623,7 +623,7 @@ static struct attribute_group ehca_drv_attr_grp = { | |||
| 623 | .attrs = ehca_drv_attrs | 623 | .attrs = ehca_drv_attrs |
| 624 | }; | 624 | }; |
| 625 | 625 | ||
| 626 | static struct attribute_group *ehca_drv_attr_groups[] = { | 626 | static const struct attribute_group *ehca_drv_attr_groups[] = { |
| 627 | &ehca_drv_attr_grp, | 627 | &ehca_drv_attr_grp, |
| 628 | NULL, | 628 | NULL, |
| 629 | }; | 629 | }; |
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index 6ba4861dd6a..b3d7efcdf02 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h | |||
| @@ -1286,7 +1286,7 @@ struct device_driver; | |||
| 1286 | 1286 | ||
| 1287 | extern const char ib_ipath_version[]; | 1287 | extern const char ib_ipath_version[]; |
| 1288 | 1288 | ||
| 1289 | extern struct attribute_group *ipath_driver_attr_groups[]; | 1289 | extern const struct attribute_group *ipath_driver_attr_groups[]; |
| 1290 | 1290 | ||
| 1291 | int ipath_device_create_group(struct device *, struct ipath_devdata *); | 1291 | int ipath_device_create_group(struct device *, struct ipath_devdata *); |
| 1292 | void ipath_device_remove_group(struct device *, struct ipath_devdata *); | 1292 | void ipath_device_remove_group(struct device *, struct ipath_devdata *); |
diff --git a/drivers/infiniband/hw/ipath/ipath_sysfs.c b/drivers/infiniband/hw/ipath/ipath_sysfs.c index a6c8efbdc0c..b8cb2f145ae 100644 --- a/drivers/infiniband/hw/ipath/ipath_sysfs.c +++ b/drivers/infiniband/hw/ipath/ipath_sysfs.c | |||
| @@ -1069,7 +1069,7 @@ static ssize_t show_tempsense(struct device *dev, | |||
| 1069 | return ret; | 1069 | return ret; |
| 1070 | } | 1070 | } |
| 1071 | 1071 | ||
| 1072 | struct attribute_group *ipath_driver_attr_groups[] = { | 1072 | const struct attribute_group *ipath_driver_attr_groups[] = { |
| 1073 | &driver_attr_group, | 1073 | &driver_attr_group, |
| 1074 | NULL, | 1074 | NULL, |
| 1075 | }; | 1075 | }; |
diff --git a/drivers/input/input.c b/drivers/input/input.c index 7c237e6ac71..851791d955f 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
| @@ -1144,7 +1144,7 @@ static struct attribute_group input_dev_caps_attr_group = { | |||
| 1144 | .attrs = input_dev_caps_attrs, | 1144 | .attrs = input_dev_caps_attrs, |
| 1145 | }; | 1145 | }; |
| 1146 | 1146 | ||
| 1147 | static struct attribute_group *input_dev_attr_groups[] = { | 1147 | static const struct attribute_group *input_dev_attr_groups[] = { |
| 1148 | &input_dev_attr_group, | 1148 | &input_dev_attr_group, |
| 1149 | &input_dev_id_attr_group, | 1149 | &input_dev_id_attr_group, |
| 1150 | &input_dev_caps_attr_group, | 1150 | &input_dev_caps_attr_group, |
diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c index 7b039306037..e9eae4a7840 100644 --- a/drivers/misc/enclosure.c +++ b/drivers/misc/enclosure.c | |||
| @@ -238,7 +238,7 @@ static void enclosure_component_release(struct device *dev) | |||
| 238 | put_device(dev->parent); | 238 | put_device(dev->parent); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | static struct attribute_group *enclosure_groups[]; | 241 | static const struct attribute_group *enclosure_groups[]; |
| 242 | 242 | ||
| 243 | /** | 243 | /** |
| 244 | * enclosure_component_register - add a particular component to an enclosure | 244 | * enclosure_component_register - add a particular component to an enclosure |
| @@ -536,7 +536,7 @@ static struct attribute_group enclosure_group = { | |||
| 536 | .attrs = enclosure_component_attrs, | 536 | .attrs = enclosure_component_attrs, |
| 537 | }; | 537 | }; |
| 538 | 538 | ||
| 539 | static struct attribute_group *enclosure_groups[] = { | 539 | static const struct attribute_group *enclosure_groups[] = { |
| 540 | &enclosure_group, | 540 | &enclosure_group, |
| 541 | NULL | 541 | NULL |
| 542 | }; | 542 | }; |
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 06084dbf127..2fb9d5f271e 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
| @@ -276,7 +276,7 @@ static struct attribute_group mmc_std_attr_group = { | |||
| 276 | .attrs = mmc_std_attrs, | 276 | .attrs = mmc_std_attrs, |
| 277 | }; | 277 | }; |
| 278 | 278 | ||
| 279 | static struct attribute_group *mmc_attr_groups[] = { | 279 | static const struct attribute_group *mmc_attr_groups[] = { |
| 280 | &mmc_std_attr_group, | 280 | &mmc_std_attr_group, |
| 281 | NULL, | 281 | NULL, |
| 282 | }; | 282 | }; |
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index cd81c395e16..7ad646fe077 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c | |||
| @@ -314,7 +314,7 @@ static struct attribute_group sd_std_attr_group = { | |||
| 314 | .attrs = sd_std_attrs, | 314 | .attrs = sd_std_attrs, |
| 315 | }; | 315 | }; |
| 316 | 316 | ||
| 317 | static struct attribute_group *sd_attr_groups[] = { | 317 | static const struct attribute_group *sd_attr_groups[] = { |
| 318 | &sd_std_attr_group, | 318 | &sd_std_attr_group, |
| 319 | NULL, | 319 | NULL, |
| 320 | }; | 320 | }; |
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 00ebf7af746..69007a6eff5 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c | |||
| @@ -217,7 +217,7 @@ struct attribute_group mtd_group = { | |||
| 217 | .attrs = mtd_attrs, | 217 | .attrs = mtd_attrs, |
| 218 | }; | 218 | }; |
| 219 | 219 | ||
| 220 | struct attribute_group *mtd_groups[] = { | 220 | const struct attribute_group *mtd_groups[] = { |
| 221 | &mtd_group, | 221 | &mtd_group, |
| 222 | NULL, | 222 | NULL, |
| 223 | }; | 223 | }; |
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index e995123fd80..393c73c47f8 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
| @@ -266,7 +266,7 @@ static struct attribute_group subch_attr_group = { | |||
| 266 | .attrs = subch_attrs, | 266 | .attrs = subch_attrs, |
| 267 | }; | 267 | }; |
| 268 | 268 | ||
| 269 | static struct attribute_group *default_subch_attr_groups[] = { | 269 | static const struct attribute_group *default_subch_attr_groups[] = { |
| 270 | &subch_attr_group, | 270 | &subch_attr_group, |
| 271 | NULL, | 271 | NULL, |
| 272 | }; | 272 | }; |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 0f95405c2c5..6527f3f3449 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
| @@ -656,7 +656,7 @@ static struct attribute_group ccwdev_attr_group = { | |||
| 656 | .attrs = ccwdev_attrs, | 656 | .attrs = ccwdev_attrs, |
| 657 | }; | 657 | }; |
| 658 | 658 | ||
| 659 | static struct attribute_group *ccwdev_attr_groups[] = { | 659 | static const struct attribute_group *ccwdev_attr_groups[] = { |
| 660 | &ccwdev_attr_group, | 660 | &ccwdev_attr_group, |
| 661 | NULL, | 661 | NULL, |
| 662 | }; | 662 | }; |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 9215fbbccc0..a4b2c576144 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
| @@ -2159,7 +2159,7 @@ static struct attribute_group netiucv_drv_attr_group = { | |||
| 2159 | .attrs = netiucv_drv_attrs, | 2159 | .attrs = netiucv_drv_attrs, |
| 2160 | }; | 2160 | }; |
| 2161 | 2161 | ||
| 2162 | static struct attribute_group *netiucv_drv_attr_groups[] = { | 2162 | static const struct attribute_group *netiucv_drv_attr_groups[] = { |
| 2163 | &netiucv_drv_attr_group, | 2163 | &netiucv_drv_attr_group, |
| 2164 | NULL, | 2164 | NULL, |
| 2165 | }; | 2165 | }; |
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index 021e503c8c4..1fbf7c78bba 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h | |||
| @@ -132,7 +132,7 @@ extern struct scsi_transport_template blank_transport_template; | |||
| 132 | extern void __scsi_remove_device(struct scsi_device *); | 132 | extern void __scsi_remove_device(struct scsi_device *); |
| 133 | 133 | ||
| 134 | extern struct bus_type scsi_bus_type; | 134 | extern struct bus_type scsi_bus_type; |
| 135 | extern struct attribute_group *scsi_sysfs_shost_attr_groups[]; | 135 | extern const struct attribute_group *scsi_sysfs_shost_attr_groups[]; |
| 136 | 136 | ||
| 137 | /* scsi_netlink.c */ | 137 | /* scsi_netlink.c */ |
| 138 | #ifdef CONFIG_SCSI_NETLINK | 138 | #ifdef CONFIG_SCSI_NETLINK |
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 91482f2dcc5..fde54537d71 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
| @@ -275,7 +275,7 @@ struct attribute_group scsi_shost_attr_group = { | |||
| 275 | .attrs = scsi_sysfs_shost_attrs, | 275 | .attrs = scsi_sysfs_shost_attrs, |
| 276 | }; | 276 | }; |
| 277 | 277 | ||
| 278 | struct attribute_group *scsi_sysfs_shost_attr_groups[] = { | 278 | const struct attribute_group *scsi_sysfs_shost_attr_groups[] = { |
| 279 | &scsi_shost_attr_group, | 279 | &scsi_shost_attr_group, |
| 280 | NULL | 280 | NULL |
| 281 | }; | 281 | }; |
| @@ -745,7 +745,7 @@ static struct attribute_group scsi_sdev_attr_group = { | |||
| 745 | .attrs = scsi_sdev_attrs, | 745 | .attrs = scsi_sdev_attrs, |
| 746 | }; | 746 | }; |
| 747 | 747 | ||
| 748 | static struct attribute_group *scsi_sdev_attr_groups[] = { | 748 | static const struct attribute_group *scsi_sdev_attr_groups[] = { |
| 749 | &scsi_sdev_attr_group, | 749 | &scsi_sdev_attr_group, |
| 750 | NULL | 750 | NULL |
| 751 | }; | 751 | }; |
diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c index bc39fc40bbd..fdfaa788551 100644 --- a/drivers/usb/core/endpoint.c +++ b/drivers/usb/core/endpoint.c | |||
| @@ -154,7 +154,7 @@ static struct attribute *ep_dev_attrs[] = { | |||
| 154 | static struct attribute_group ep_dev_attr_grp = { | 154 | static struct attribute_group ep_dev_attr_grp = { |
| 155 | .attrs = ep_dev_attrs, | 155 | .attrs = ep_dev_attrs, |
| 156 | }; | 156 | }; |
| 157 | static struct attribute_group *ep_dev_groups[] = { | 157 | static const struct attribute_group *ep_dev_groups[] = { |
| 158 | &ep_dev_attr_grp, | 158 | &ep_dev_attr_grp, |
| 159 | NULL | 159 | NULL |
| 160 | }; | 160 | }; |
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index b5c72e45894..7ec3041ae79 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c | |||
| @@ -573,7 +573,7 @@ static struct attribute_group dev_string_attr_grp = { | |||
| 573 | .is_visible = dev_string_attrs_are_visible, | 573 | .is_visible = dev_string_attrs_are_visible, |
| 574 | }; | 574 | }; |
| 575 | 575 | ||
| 576 | struct attribute_group *usb_device_groups[] = { | 576 | const struct attribute_group *usb_device_groups[] = { |
| 577 | &dev_attr_grp, | 577 | &dev_attr_grp, |
| 578 | &dev_string_attr_grp, | 578 | &dev_string_attr_grp, |
| 579 | NULL | 579 | NULL |
| @@ -799,7 +799,7 @@ static struct attribute_group intf_assoc_attr_grp = { | |||
| 799 | .is_visible = intf_assoc_attrs_are_visible, | 799 | .is_visible = intf_assoc_attrs_are_visible, |
| 800 | }; | 800 | }; |
| 801 | 801 | ||
| 802 | struct attribute_group *usb_interface_groups[] = { | 802 | const struct attribute_group *usb_interface_groups[] = { |
| 803 | &intf_attr_grp, | 803 | &intf_attr_grp, |
| 804 | &intf_assoc_attr_grp, | 804 | &intf_assoc_attr_grp, |
| 805 | NULL | 805 | NULL |
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index e2a8cfaade1..c0e0ae2bb8e 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h | |||
| @@ -152,8 +152,8 @@ static inline int is_active(const struct usb_interface *f) | |||
| 152 | extern const char *usbcore_name; | 152 | extern const char *usbcore_name; |
| 153 | 153 | ||
| 154 | /* sysfs stuff */ | 154 | /* sysfs stuff */ |
| 155 | extern struct attribute_group *usb_device_groups[]; | 155 | extern const struct attribute_group *usb_device_groups[]; |
| 156 | extern struct attribute_group *usb_interface_groups[]; | 156 | extern const struct attribute_group *usb_interface_groups[]; |
| 157 | 157 | ||
| 158 | /* usbfs stuff */ | 158 | /* usbfs stuff */ |
| 159 | extern struct mutex usbfs_mutex; | 159 | extern struct mutex usbfs_mutex; |
diff --git a/drivers/uwb/lc-dev.c b/drivers/uwb/lc-dev.c index e9fe1bb7eb2..1097e81b56d 100644 --- a/drivers/uwb/lc-dev.c +++ b/drivers/uwb/lc-dev.c | |||
| @@ -255,7 +255,7 @@ static struct attribute_group dev_attr_group = { | |||
| 255 | .attrs = dev_attrs, | 255 | .attrs = dev_attrs, |
| 256 | }; | 256 | }; |
| 257 | 257 | ||
| 258 | static struct attribute_group *groups[] = { | 258 | static const struct attribute_group *groups[] = { |
| 259 | &dev_attr_group, | 259 | &dev_attr_group, |
| 260 | NULL, | 260 | NULL, |
| 261 | }; | 261 | }; |
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 619ba99dfe3..fbeaddf595d 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
| @@ -312,7 +312,7 @@ static struct attribute_group part_attr_group = { | |||
| 312 | .attrs = part_attrs, | 312 | .attrs = part_attrs, |
| 313 | }; | 313 | }; |
| 314 | 314 | ||
| 315 | static struct attribute_group *part_attr_groups[] = { | 315 | static const struct attribute_group *part_attr_groups[] = { |
| 316 | &part_attr_group, | 316 | &part_attr_group, |
| 317 | #ifdef CONFIG_BLK_DEV_IO_TRACE | 317 | #ifdef CONFIG_BLK_DEV_IO_TRACE |
| 318 | &blk_trace_attr_group, | 318 | &blk_trace_attr_group, |
diff --git a/include/linux/attribute_container.h b/include/linux/attribute_container.h index 794ad74b1d6..c3ab81428c6 100644 --- a/include/linux/attribute_container.h +++ b/include/linux/attribute_container.h | |||
| @@ -17,7 +17,7 @@ struct attribute_container { | |||
| 17 | struct list_head node; | 17 | struct list_head node; |
| 18 | struct klist containers; | 18 | struct klist containers; |
| 19 | struct class *class; | 19 | struct class *class; |
| 20 | struct attribute_group *grp; | 20 | const struct attribute_group *grp; |
| 21 | struct device_attribute **attrs; | 21 | struct device_attribute **attrs; |
| 22 | int (*match)(struct attribute_container *, struct device *); | 22 | int (*match)(struct attribute_container *, struct device *); |
| 23 | #define ATTRIBUTE_CONTAINER_NO_CLASSDEVS 0x01 | 23 | #define ATTRIBUTE_CONTAINER_NO_CLASSDEVS 0x01 |
diff --git a/include/linux/device.h b/include/linux/device.h index 3f33f17f556..e19e40a3dcb 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -131,7 +131,7 @@ struct device_driver { | |||
| 131 | void (*shutdown) (struct device *dev); | 131 | void (*shutdown) (struct device *dev); |
| 132 | int (*suspend) (struct device *dev, pm_message_t state); | 132 | int (*suspend) (struct device *dev, pm_message_t state); |
| 133 | int (*resume) (struct device *dev); | 133 | int (*resume) (struct device *dev); |
| 134 | struct attribute_group **groups; | 134 | const struct attribute_group **groups; |
| 135 | 135 | ||
| 136 | const struct dev_pm_ops *pm; | 136 | const struct dev_pm_ops *pm; |
| 137 | 137 | ||
| @@ -288,7 +288,7 @@ extern void class_destroy(struct class *cls); | |||
| 288 | */ | 288 | */ |
| 289 | struct device_type { | 289 | struct device_type { |
| 290 | const char *name; | 290 | const char *name; |
| 291 | struct attribute_group **groups; | 291 | const struct attribute_group **groups; |
| 292 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); | 292 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); |
| 293 | char *(*nodename)(struct device *dev); | 293 | char *(*nodename)(struct device *dev); |
| 294 | void (*release)(struct device *dev); | 294 | void (*release)(struct device *dev); |
| @@ -412,7 +412,7 @@ struct device { | |||
| 412 | 412 | ||
| 413 | struct klist_node knode_class; | 413 | struct klist_node knode_class; |
| 414 | struct class *class; | 414 | struct class *class; |
| 415 | struct attribute_group **groups; /* optional groups */ | 415 | const struct attribute_group **groups; /* optional groups */ |
| 416 | 416 | ||
| 417 | void (*release)(struct device *dev); | 417 | void (*release)(struct device *dev); |
| 418 | }; | 418 | }; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 65ee1929b2b..a9aa4b5917d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -895,7 +895,7 @@ struct net_device | |||
| 895 | /* class/net/name entry */ | 895 | /* class/net/name entry */ |
| 896 | struct device dev; | 896 | struct device dev; |
| 897 | /* space for optional statistics and wireless sysfs groups */ | 897 | /* space for optional statistics and wireless sysfs groups */ |
| 898 | struct attribute_group *sysfs_groups[3]; | 898 | const struct attribute_group *sysfs_groups[3]; |
| 899 | 899 | ||
| 900 | /* rtnetlink link ops */ | 900 | /* rtnetlink link ops */ |
| 901 | const struct rtnl_link_ops *rtnl_link_ops; | 901 | const struct rtnl_link_ops *rtnl_link_ops; |
diff --git a/include/linux/transport_class.h b/include/linux/transport_class.h index eaec1ea9558..9ae8da3e640 100644 --- a/include/linux/transport_class.h +++ b/include/linux/transport_class.h | |||
| @@ -55,7 +55,7 @@ struct anon_transport_class cls = { \ | |||
| 55 | 55 | ||
| 56 | struct transport_container { | 56 | struct transport_container { |
| 57 | struct attribute_container ac; | 57 | struct attribute_container ac; |
| 58 | struct attribute_group *statistics; | 58 | const struct attribute_group *statistics; |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | #define attribute_container_to_transport_container(x) \ | 61 | #define attribute_container_to_transport_container(x) \ |
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index 95f7a7a544b..7f939ce2980 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
| @@ -68,7 +68,7 @@ static struct attribute_group bt_link_group = { | |||
| 68 | .attrs = bt_link_attrs, | 68 | .attrs = bt_link_attrs, |
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | static struct attribute_group *bt_link_groups[] = { | 71 | static const struct attribute_group *bt_link_groups[] = { |
| 72 | &bt_link_group, | 72 | &bt_link_group, |
| 73 | NULL | 73 | NULL |
| 74 | }; | 74 | }; |
| @@ -392,7 +392,7 @@ static struct attribute_group bt_host_group = { | |||
| 392 | .attrs = bt_host_attrs, | 392 | .attrs = bt_host_attrs, |
| 393 | }; | 393 | }; |
| 394 | 394 | ||
| 395 | static struct attribute_group *bt_host_groups[] = { | 395 | static const struct attribute_group *bt_host_groups[] = { |
| 396 | &bt_host_group, | 396 | &bt_host_group, |
| 397 | NULL | 397 | NULL |
| 398 | }; | 398 | }; |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index ad91e9e5f47..7d4c57523b0 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
| @@ -493,7 +493,7 @@ void netdev_unregister_kobject(struct net_device * net) | |||
| 493 | int netdev_register_kobject(struct net_device *net) | 493 | int netdev_register_kobject(struct net_device *net) |
| 494 | { | 494 | { |
| 495 | struct device *dev = &(net->dev); | 495 | struct device *dev = &(net->dev); |
| 496 | struct attribute_group **groups = net->sysfs_groups; | 496 | const struct attribute_group **groups = net->sysfs_groups; |
| 497 | 497 | ||
| 498 | dev->class = &net_class; | 498 | dev->class = &net_class; |
| 499 | dev->platform_data = net; | 499 | dev->platform_data = net; |
