qlcnic: add const to bin_attribute structure
authorBhumika Goyal <bhumirks@gmail.com>
Wed, 2 Aug 2017 17:57:14 +0000 (23:27 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Aug 2017 16:28:51 +0000 (09:28 -0700)
Add const to bin_attribute structure as it is only passed to the
functions sysfs_{remove/create}_bin_file. The corresponding
arguments are of type const, so declare the structure to be const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c

index 73027a6c06c7c46e8a87450267e46f9bd41a6095..82fcb83ea3c89657cfb2700ce728affad3ba9216 100644 (file)
@@ -1248,7 +1248,7 @@ static const struct bin_attribute bin_attr_pm_config = {
        .write = qlcnic_sysfs_write_pm_config,
 };
 
-static struct bin_attribute bin_attr_flash = {
+static const struct bin_attribute bin_attr_flash = {
        .attr = {.name = "flash", .mode = (S_IRUGO | S_IWUSR)},
        .size = 0,
        .read = qlcnic_83xx_sysfs_flash_read_handler,