From: Jean Delvare Date: Wed, 27 Jul 2005 19:32:02 +0000 (+0200) Subject: [PATCH] hwmon: tag super-i/o find functions __init X-Git-Tag: v2.6.14-rc1~752^2~41 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e6cfb3ad7209e4f4dcdc14f5fc437db55667041f;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index b1719f4097e..ca4f953363f 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -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 */ -static int it87_find(int *address) +static int __init it87_find(int *address) { int err = -ENODEV; diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c index 1f1b3ca23f6..c66ae4f6e80 100644 --- a/drivers/hwmon/pc87360.c +++ b/drivers/hwmon/pc87360.c @@ -626,7 +626,7 @@ static DEVICE_ATTR(alarms_temp, S_IRUGO, show_temp_alarms, NULL); * 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; int i; diff --git a/drivers/hwmon/smsc47m1.c b/drivers/hwmon/smsc47m1.c index 9da5d546e86..dab22bd75b6 100644 --- a/drivers/hwmon/smsc47m1.c +++ b/drivers/hwmon/smsc47m1.c @@ -345,7 +345,7 @@ fan_present(2); 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; diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c index f1ae0e00691..0466cc4b760 100644 --- a/drivers/hwmon/w83627hf.c +++ b/drivers/hwmon/w83627hf.c @@ -958,7 +958,7 @@ device_create_file(&client->dev, &dev_attr_temp##offset##_type); \ } while (0) -static int w83627hf_find(int sioaddr, unsigned short *addr) +static int __init w83627hf_find(int sioaddr, unsigned short *addr) { u16 val;