Commit e6cfb3ad authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman

[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: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7bef5594
...@@ -707,7 +707,7 @@ static int it87_isa_attach_adapter(struct i2c_adapter *adapter) ...@@ -707,7 +707,7 @@ static int it87_isa_attach_adapter(struct i2c_adapter *adapter)
} }
/* SuperIO detection - will change isa_address if a chip is found */ /* SuperIO detection - will change isa_address if a chip is found */
static int it87_find(int *address) static int __init it87_find(int *address)
{ {
int err = -ENODEV; int err = -ENODEV;
......
...@@ -626,7 +626,7 @@ static DEVICE_ATTR(alarms_temp, S_IRUGO, show_temp_alarms, NULL); ...@@ -626,7 +626,7 @@ static DEVICE_ATTR(alarms_temp, S_IRUGO, show_temp_alarms, NULL);
* Device detection, registration and update * Device detection, registration and update
*/ */
static int pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses) static int __init pc87360_find(int sioaddr, u8 *devid, unsigned short *addresses)
{ {
u16 val; u16 val;
int i; int i;
......
...@@ -345,7 +345,7 @@ fan_present(2); ...@@ -345,7 +345,7 @@ fan_present(2);
static DEVICE_ATTR(alarms, S_IRUGO, get_alarms, NULL); static DEVICE_ATTR(alarms, S_IRUGO, get_alarms, NULL);
static int smsc47m1_find(unsigned short *addr) static int __init smsc47m1_find(unsigned short *addr)
{ {
u8 val; u8 val;
......
...@@ -958,7 +958,7 @@ device_create_file(&client->dev, &dev_attr_temp##offset##_type); \ ...@@ -958,7 +958,7 @@ device_create_file(&client->dev, &dev_attr_temp##offset##_type); \
} while (0) } while (0)
static int w83627hf_find(int sioaddr, unsigned short *addr) static int __init w83627hf_find(int sioaddr, unsigned short *addr)
{ {
u16 val; u16 val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment