]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
hwmon: Don't overuse I2C_CLIENT_MODULE_PARM
authorJean Delvare <khali@linux-fr.org>
Wed, 7 Jan 2009 15:37:32 +0000 (16:37 +0100)
committerJean Delvare <khali@linux-fr.org>
Wed, 7 Jan 2009 15:37:32 +0000 (16:37 +0100)
I2C_CLIENT_MODULE_PARM is overkill for force_subclients. We really
only use 4 out of the 48 slots, so we're better defining a custom
variable instead. This change saves 92 bytes of data for each of the
five drivers affected.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Marc Hulsman <m.hulsman@tudelft.nl>
Cc: Mark M. Hoffman <mhoffman@lightlink.com>
drivers/hwmon/asb100.c
drivers/hwmon/w83781d.c
drivers/hwmon/w83791d.c
drivers/hwmon/w83792d.c
drivers/hwmon/w83793.c

index 8a45a2e6ba8aef102b9f4b2e75e436b53399e021..8acf82977e7b4b4affa8d9135b8bbe3b7ab98440 100644 (file)
@@ -53,7 +53,10 @@ static const unsigned short normal_i2c[] = { 0x2d, I2C_CLIENT_END };
 
 /* Insmod parameters */
 I2C_CLIENT_INSMOD_1(asb100);
-I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: "
+
+static unsigned short force_subclients[4];
+module_param_array(force_subclients, short, NULL, 0);
+MODULE_PARM_DESC(force_subclients, "List of subclient addresses: "
        "{bus, clientaddr, subclientaddr1, subclientaddr2}");
 
 /* Voltage IN registers 0-6 */
index fc12bd412e3a4917b5645339d3dd388af8f0d3a3..dbfb30c588d8cfea06d59ab240dce5e2d07cde15 100644 (file)
@@ -58,7 +58,10 @@ static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
                                                0x2e, 0x2f, I2C_CLIENT_END };
 /* Insmod parameters */
 I2C_CLIENT_INSMOD_4(w83781d, w83782d, w83783s, as99127f);
-I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: "
+
+static unsigned short force_subclients[4];
+module_param_array(force_subclients, short, NULL, 0);
+MODULE_PARM_DESC(force_subclients, "List of subclient addresses: "
                    "{bus, clientaddr, subclientaddr1, subclientaddr2}");
 
 static int reset;
index 5768def8a4f2766ea87b361062ed6d5c737a3c4b..97851c5ba3a3872caa715e130c3ff12a29c55297 100644 (file)
@@ -53,7 +53,10 @@ static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f,
 
 /* Insmod parameters */
 I2C_CLIENT_INSMOD_1(w83791d);
-I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: "
+
+static unsigned short force_subclients[4];
+module_param_array(force_subclients, short, NULL, 0);
+MODULE_PARM_DESC(force_subclients, "List of subclient addresses: "
                        "{bus, clientaddr, subclientaddr1, subclientaddr2}");
 
 static int reset;
index cf94c5b0c879aa48881c3aba7404e80b2ad74199..2be16194ddf3a980674ea91f111c4437a9890e5b 100644 (file)
@@ -51,7 +51,10 @@ static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f,
 
 /* Insmod parameters */
 I2C_CLIENT_INSMOD_1(w83792d);
-I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: "
+
+static unsigned short force_subclients[4];
+module_param_array(force_subclients, short, NULL, 0);
+MODULE_PARM_DESC(force_subclients, "List of subclient addresses: "
                        "{bus, clientaddr, subclientaddr1, subclientaddr2}");
 
 static int init;
index 0a739f1c69be568890d0168d739933b4acdf9655..47dd398f72589ba795abbb11e550e9bb82fd4e00 100644 (file)
@@ -42,7 +42,10 @@ static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f,
 
 /* Insmod parameters */
 I2C_CLIENT_INSMOD_1(w83793);
-I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: "
+
+static unsigned short force_subclients[4];
+module_param_array(force_subclients, short, NULL, 0);
+MODULE_PARM_DESC(force_subclients, "List of subclient addresses: "
                       "{bus, clientaddr, subclientaddr1, subclientaddr2}");
 
 static int reset;