Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1702161 > unrolled thread

[PATCH] FMC: add const to bin_attribute structure

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-08-02 16:30 +0200
Last post2017-08-02 16:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] FMC: add const to bin_attribute structure Bhumika Goyal <bhumirks@gmail.com> - 2017-08-02 16:30 +0200

#1702161 — [PATCH] FMC: add const to bin_attribute structure

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-02 16:30 +0200
Subject[PATCH] FMC: add const to bin_attribute structure
Message-ID<ua2OR-2xp-13@gated-at.bofh.it>
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 as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/fmc/fmc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/fmc/fmc-core.c b/drivers/fmc/fmc-core.c
index 353fc54..3885130 100644
--- a/drivers/fmc/fmc-core.c
+++ b/drivers/fmc/fmc-core.c
@@ -111,7 +111,7 @@ static ssize_t fmc_write_eeprom(struct file *file, struct kobject *kobj,
 	return fmc->op->write_ee(fmc, off, buf, count);
 }
 
-static struct bin_attribute fmc_eeprom_attr = {
+static const struct bin_attribute fmc_eeprom_attr = {
 	.attr = { .name = "eeprom", .mode = S_IRUGO | S_IWUSR, },
 	.size = 8192, /* more or less standard */
 	.read = fmc_read_eeprom,
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web