Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] hwmon: tag super-i/o find functions __init

Super-I/O find functions in hardware monitoring drivers can be tagged
__init as they are only called from functions themselves tagged __init.
Two of them (smsc47b397 and w83627ehf) already do, but the other four
of them (it87, pc87360, smsc47m1 and w83627hf) did not.

This saves a few bytes of memory after the drivers are loaded, 192 in
the case of the it87 driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Jean Delvare and committed by
Greg Kroah-Hartman
e6cfb3ad 7bef5594

+4 -4
+1 -1
drivers/hwmon/it87.c
··· 707 707 } 708 708 709 709 /* SuperIO detection - will change isa_address if a chip is found */ 710 - static int it87_find(int *address) 710 + static int __init it87_find(int *address) 711 711 { 712 712 int err = -ENODEV; 713 713
+1 -1
drivers/hwmon/pc87360.c
··· 626 626 * Device detection, registration and update 627 627 */ 628 628 629 - static int pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses) 629 + static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses) 630 630 { 631 631 u16 val; 632 632 int i;
+1 -1
drivers/hwmon/smsc47m1.c
··· 345 345 346 346 static DEVICE_ATTR(alarms, S_IRUGO, get_alarms, NULL); 347 347 348 - static int smsc47m1_find(unsigned short *addr) 348 + static int __init smsc47m1_find(unsigned short *addr) 349 349 { 350 350 u8 val; 351 351
+1 -1
drivers/hwmon/w83627hf.c
··· 958 958 } while (0) 959 959 960 960 961 - static int w83627hf_find(int sioaddr, unsigned short *addr) 961 + static int __init w83627hf_find(int sioaddr, unsigned short *addr) 962 962 { 963 963 u16 val; 964 964