android_kernel_xiaomi_sm8350/drivers/misc
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
..
c2port
cb710
eeprom init dynamic bin_attribute structures 2010-03-14 20:28:39 -07:00
hdpuftrs
ibmasm
iwmc3200top drivers/misc/iwmc3200top/main.c: eliminate useless code 2010-03-06 11:26:32 -08:00
sgi-gru sgi-gru: use for_each_set_bit() 2010-03-12 15:52:44 -08:00
sgi-xp bitops: rename for_each_bit() to for_each_set_bit() 2010-03-06 11:26:23 -08:00
ad525x_dpot.c ad525x_dpot: new driver for AD525x digital potentiometers 2009-12-15 08:53:25 -08:00
atmel_pwm.c
atmel_tclib.c
atmel-ssc.c
cs5535-mfgpt.c cs5535: add a generic MFGPT driver 2009-12-15 08:53:28 -08:00
ds1682.c i2c/chips: Move ds1682 to drivers/misc 2009-12-06 17:06:16 +01:00
enclosure.c [SCSI] enclosure: fix oops while iterating enclosure_status array 2009-12-10 08:54:14 -06:00
ep93xx_pwm.c
hpilo.c
hpilo.h hpilo: add locking comment 2009-12-11 11:24:51 -08:00
ics932s401.c i2c: Drop I2C_CLIENT_INSMOD_1 2009-12-14 21:17:26 +01:00
ioc4.c ioc3/ioc4: various section fixes 2009-12-15 08:53:27 -08:00
isl29003.c
Kconfig tsl2550: Move from i2c/chips to misc 2010-03-13 20:56:54 +01:00
kgdbts.c kgdb: Replace strstr() by strchr() for single-character needles 2009-12-11 08:43:15 -06:00
lkdtm.c lkdtm: add debugfs access and loosen KPROBE ties 2010-03-06 11:26:32 -08:00
Makefile tsl2550: Move from i2c/chips to misc 2010-03-13 20:56:54 +01:00
phantom.c driver core: Convert some drivers to CLASS_ATTR_STRING 2010-03-07 17:04:48 -08:00
ti_dac7512.c drivers/misc: add driver for Texas Instruments DAC7512 2009-12-15 08:53:25 -08:00
tifm_7xx1.c
tifm_core.c
tsl2550.c tsl2550: Move from i2c/chips to misc 2010-03-13 20:56:54 +01:00