Skip to contentSkip to conversation

FMC: add const to bin_attribute structure

PATCH New Bhumika Goyal 1 participant 1 message Aug 2, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 FMC: add const to bin_attribute structure

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.

---
 drivers/fmc/fmc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fmc/fmc-core.c +1 -1
index 353fc54..3885130 100644
@@ -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,
Signature · 1 line
1.9.1