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: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Bhumika Goyal 2017-08-02 23:37:38 +05:30 committed by Michael Ellerman
parent 96c79b6bd7
commit 8bfa42ab84
2 changed files with 2 additions and 2 deletions

View file

@ -520,7 +520,7 @@ static ssize_t image_data_write(struct file *filp, struct kobject *kobj,
* 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},
.size = MAX_IMAGE_SIZE, /* Limit image size */
.write = image_data_write,

View file

@ -70,7 +70,7 @@ static ssize_t mv64x60_hs_reg_write(struct file *filp, struct kobject *kobj,
return count;
}
static struct bin_attribute mv64x60_hs_reg_attr = { /* Hotswap register */
static const struct bin_attribute mv64x60_hs_reg_attr = { /* Hotswap register */
.attr = {
.name = "hs_reg",
.mode = S_IRUGO | S_IWUSR,