From e0dfabe9f24083e4a477fc5b0d21b5b2911e6ec2 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Tue, 2 Jan 2007 18:41:52 +0000 Subject: [PATCH] bmcsensors: Fix fragile structure initialization. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4277 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + kernel/chips/bmcsensors.c | 14 +++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index 4b5cdfb3..956b0836 100644 --- a/CHANGES +++ b/CHANGES @@ -17,6 +17,7 @@ SVN HEAD Man page i2cdetect.8: Describe the output convention Man page sensors.1: Update (option -c) and clean up Module bmcsensors: Fix several warnings + Fix fragile structure initialization Module i2c-i801: Add ICH9 support Module f71805f: Fix the device address decoding (2.6 backport) Module icspll: Delete. It was useless and dangerous. diff --git a/kernel/chips/bmcsensors.c b/kernel/chips/bmcsensors.c index 12dc858e..16b963d7 100644 --- a/kernel/chips/bmcsensors.c +++ b/kernel/chips/bmcsensors.c @@ -84,15 +84,11 @@ static struct i2c_driver bmcsensors_driver = { }; static struct bmcsensors_data bmc_data; -struct i2c_client bmc_client = { - "BMC Sensors", - 1, /* fake should be 0 */ - 0, - 0, - NULL, /* adapter */ - &bmcsensors_driver, - & bmc_data, - 0 +static struct i2c_client bmc_client = { + .name = "BMC Sensors", + .id = 1, /* fake should be 0 */ + .driver = &bmcsensors_driver, + .data = &bmc_data, }; static int bmcsensors_initialized;