drivers/fsi: add const to bin_attribute structures
authorBhumika Goyal <bhumirks@gmail.com>
Wed, 2 Aug 2017 14:09:32 +0000 (19:39 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 15:15:16 +0000 (17:15 +0200)
Declare bin_attribute structures as const as they are only passed as an
argument to the function device_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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fsi/fsi-core.c

index 06432d84cbf8c58215fdd7e1fcd07ab85926ad91..4ea63d9bd1315ae6e0f8e0f60411bd1a36b5dca7 100644 (file)
@@ -475,7 +475,7 @@ static ssize_t fsi_slave_sysfs_raw_write(struct file *file,
        return count;
 }
 
-static struct bin_attribute fsi_slave_raw_attr = {
+static const struct bin_attribute fsi_slave_raw_attr = {
        .attr = {
                .name = "raw",
                .mode = 0600,
@@ -499,7 +499,7 @@ static ssize_t fsi_slave_sysfs_term_write(struct file *file,
        return count;
 }
 
-static struct bin_attribute fsi_slave_term_attr = {
+static const struct bin_attribute fsi_slave_term_attr = {
        .attr = {
                .name = "term",
                .mode = 0200,