linux/drivers/misc/eeprom
Bhumika Goyal 57daedf812 MISC: add const to bin_attribute structures
Add const to bin_attribute structures as they are only passed to the
functions sysfs_{remove/create}_bin_file. The arguments passed are of
type const, so declare the structures to be const.

Done using Coccinelle.

@m disable optional_qualifier@
identifier s;
position p;
@@
static struct bin_attribute s@p={...};

@okay1@
position p;
identifier m.s;
@@
(
sysfs_create_bin_file(...,&s@p,...)
|
sysfs_remove_bin_file(...,&s@p,...)
)

@bad@
position p!={m.p,okay1.p};
identifier m.s;
@@
s@p

@change depends on !bad disable optional_qualifier@
identifier m.s;
@@
static
+const
struct bin_attribute s={...};

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-28 16:55:48 +02:00
..
at24.c misc: eeprom: at24: use device_property_*() functions instead of of_get_property() 2017-02-11 21:23:43 +01:00
at25.c at25: fix debug and error messaging 2016-09-27 12:43:35 +02:00
digsy_mtc_eeprom.c misc/eeprom: add eeprom access driver for digsy_mtc board 2011-07-25 20:57:16 -07:00
eeprom_93cx6.c eeprom-93cx6: Add (read-only) support for 8-bit mode 2014-11-25 15:42:53 +01:00
eeprom_93xx46.c misc: eeprom_93xx46: Simplify the usage of gpiod API 2017-08-28 16:55:47 +02:00
eeprom.c MISC: add const to bin_attribute structures 2017-08-28 16:55:48 +02:00
idt_89hpesx.c eeprom: idt_89hpesx: Add OF device ID table 2017-04-08 18:22:59 +02:00
Kconfig eeprom: Add IDT 89HPESx EEPROM/CSR driver 2017-01-19 11:39:57 +01:00
Makefile eeprom: Add IDT 89HPESx EEPROM/CSR driver 2017-01-19 11:39:57 +01:00
max6875.c MISC: add const to bin_attribute structures 2017-08-28 16:55:48 +02:00