linux_dsm_epyc7002/drivers/misc/eeprom
Wolfram Sang f937331b3f init dynamic bin_attribute structures
Commit 6992f53349 ("sysfs: Use one lockdep
class per sysfs attribute.") introduced this requirement.  First, at25
was fixed manually.  Then, other occurences were found with coccinelle
and the following semantic patch.  Results were reviewed and fixed up:

    @ init @
    identifier struct_name, bin;
    @@

    	struct struct_name {
    		...
    		struct bin_attribute bin;
    		...
    	};

    @ main extends init @
    expression E;
    statement S;
    identifier name, err;
    @@

    (
    	struct struct_name *name;
    |
    -	struct struct_name *name = NULL;
    +	struct struct_name *name;
    )
    	...
    (
    	sysfs_bin_attr_init(&name->bin);
    |
    +	sysfs_bin_attr_init(&name->bin);
    	if (sysfs_create_bin_file(E, &name->bin))
    		S
    |
    +	sysfs_bin_attr_init(&name->bin);
    	err = sysfs_create_bin_file(E, &name->bin);
    )

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-14 20:28:39 -07:00
..
at24.c at24: Init dynamic bin_attribute structures 2010-03-13 20:56:55 +01:00
at25.c init dynamic bin_attribute structures 2010-03-14 20:28:39 -07:00
eeprom_93cx6.c eeprom: Move 93cx6 eeprom driver to /drivers/misc/eeprom 2009-01-26 21:19:54 +01:00
eeprom.c i2c: Drop I2C_CLIENT_INSMOD_1 2009-12-14 21:17:26 +01:00
Kconfig i2c/chips: Move max6875 to drivers/misc/eeprom 2009-06-15 18:01:49 +02:00
Makefile i2c/chips: Move max6875 to drivers/misc/eeprom 2009-06-15 18:01:49 +02:00
max6875.c max6875: Discard obsolete detect method 2009-10-04 22:53:41 +02:00