Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cacf2269b6cde2ff2c29a13dff5ce6886ff1dc73
Commit:     cacf2269b6cde2ff2c29a13dff5ce6886ff1dc73
Parent:     3c4bb241d34ee3d9ab87aad265734885385f179b
Author:     Jean Delvare <[EMAIL PROTECTED]>
AuthorDate: Tue May 1 23:26:29 2007 +0200
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Tue May 1 23:26:29 2007 +0200

    i2c-parport: Optimize binary size
    
    Initialize the fields of the i2c_adapter structure individually,
    rather than copying a whole static template structure. This shaves
    off 474 bytes or 14% (on i386) from the binary size.
    
    Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/busses/i2c-parport.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c
index 66696a4..b9f1c5c 100644
--- a/drivers/i2c/busses/i2c-parport.c
+++ b/drivers/i2c/busses/i2c-parport.c
@@ -143,13 +143,6 @@ static struct i2c_algo_bit_data parport_algo_data = {
 
 /* ----- I2c and parallel port call-back functions and structures --------- */
 
-static struct i2c_adapter parport_adapter = {
-       .owner          = THIS_MODULE,
-       .class          = I2C_CLASS_HWMON,
-       .id             = I2C_HW_B_LP,
-       .name           = "Parallel port adapter",
-};
-
 static void i2c_parport_attach (struct parport *port)
 {
        struct i2c_par *adapter;
@@ -169,7 +162,11 @@ static void i2c_parport_attach (struct parport *port)
        }
 
        /* Fill the rest of the structure */
-       adapter->adapter = parport_adapter;
+       adapter->adapter.owner = THIS_MODULE;
+       adapter->adapter.class = I2C_CLASS_HWMON;
+       adapter->adapter.id = I2C_HW_B_LP;
+       strlcpy(adapter->adapter.name, "Parallel port adapter",
+               sizeof(adapter->adapter.name));
        adapter->algo_data = parport_algo_data;
        if (!adapter_parm[type].getscl.val)
                adapter->algo_data.getscl = NULL;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to