Commit 8bfa42ab authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Michael Ellerman

powerpc: Add const to bin_attribute structures

Declare bin_attribute structures as const as they are only passed as an
argument to the function sysfs_create_bin_file. This argument is of
type const, so declare the structure as const.
Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 96c79b6b
...@@ -520,7 +520,7 @@ static ssize_t image_data_write(struct file *filp, struct kobject *kobj, ...@@ -520,7 +520,7 @@ static ssize_t image_data_write(struct file *filp, struct kobject *kobj,
* update_flash : Flash new firmware image * update_flash : Flash new firmware image
* *
*/ */
static struct bin_attribute image_data_attr = { static const struct bin_attribute image_data_attr = {
.attr = {.name = "image", .mode = 0200}, .attr = {.name = "image", .mode = 0200},
.size = MAX_IMAGE_SIZE, /* Limit image size */ .size = MAX_IMAGE_SIZE, /* Limit image size */
.write = image_data_write, .write = image_data_write,
......
...@@ -70,7 +70,7 @@ static ssize_t mv64x60_hs_reg_write(struct file *filp, struct kobject *kobj, ...@@ -70,7 +70,7 @@ static ssize_t mv64x60_hs_reg_write(struct file *filp, struct kobject *kobj,
return count; return count;
} }
static struct bin_attribute mv64x60_hs_reg_attr = { /* Hotswap register */ static const struct bin_attribute mv64x60_hs_reg_attr = { /* Hotswap register */
.attr = { .attr = {
.name = "hs_reg", .name = "hs_reg",
.mode = S_IRUGO | S_IWUSR, .mode = S_IRUGO | S_IWUSR,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment