Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aeb292d1342c649ac0b35ae9205b761fd14adb57
Commit:     aeb292d1342c649ac0b35ae9205b761fd14adb57
Parent:     9c12224a607a4b22ab86784e3394b52810b9507c
Author:     Jean Delvare <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 23 15:45:41 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 22:06:24 2007 -0300

    V4L/DVB (6081): ivtv: Fix static structure initialization
    
    Convert the initialization of ivtv_i2c_algo_template to C99-style.
    Otherwise a future change to struct i2c_algo_bit_data would break
    this code.
    
    Also declared that structure const - it's a template after all.
    
    Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
    Signed-off-by: Hans Verkuil <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/ivtv/ivtv-i2c.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/media/video/ivtv/ivtv-i2c.c 
b/drivers/media/video/ivtv/ivtv-i2c.c
index 5e12ebc..085dc39 100644
--- a/drivers/media/video/ivtv/ivtv-i2c.c
+++ b/drivers/media/video/ivtv/ivtv-i2c.c
@@ -536,14 +536,13 @@ static struct i2c_adapter ivtv_i2c_adap_template = {
 #endif
 };
 
-static struct i2c_algo_bit_data ivtv_i2c_algo_template = {
-       NULL,                   /* ?? */
-       ivtv_setsda_old,        /* setsda function */
-       ivtv_setscl_old,        /* " */
-       ivtv_getsda_old,        /* " */
-       ivtv_getscl_old,        /* " */
-       10,                     /* udelay */
-       200                     /* timeout */
+static const struct i2c_algo_bit_data ivtv_i2c_algo_template = {
+       .setsda         = ivtv_setsda_old,
+       .setscl         = ivtv_setscl_old,
+       .getsda         = ivtv_getsda_old,
+       .getscl         = ivtv_getscl_old,
+       .udelay         = 10,
+       .timeout        = 200,
 };
 
 static struct i2c_client ivtv_i2c_client_template = {
-
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