diff options
author | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2012-01-08 19:34:13 +0100 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2012-03-18 18:26:40 -0700 |
commit | 6b904b623ab4646ce64124462c4bec6f0d3f78a6 (patch) | |
tree | 5dcc5080c1e1f39aec2d7ed1e3eb627dd22a6468 /drivers/hwmon | |
parent | e6a83dbec9a62b9d57826c1dd17a62c9ad41a5aa (diff) | |
download | op-kernel-dev-6b904b623ab4646ce64124462c4bec6f0d3f78a6.zip op-kernel-dev-6b904b623ab4646ce64124462c4bec6f0d3f78a6.tar.gz |
hwmon: (adt7470) fix checkpatch issues
fixed:
ERROR: that open brace { should be on the previous line
#1135: FILE: adt7470.c:1135:
+static struct attribute *adt7470_attr[] =
+{
ERROR: do not use assignment in if condition
#1279: FILE: adt7470.c:1279:
+ if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs)))
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/adt7470.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c index 5e10c79..b23efd9 100644 --- a/drivers/hwmon/adt7470.c +++ b/drivers/hwmon/adt7470.c @@ -1131,8 +1131,7 @@ static SENSOR_DEVICE_ATTR(pwm3_auto_channels_temp, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR(pwm4_auto_channels_temp, S_IWUSR | S_IRUGO, show_pwm_auto_temp, set_pwm_auto_temp, 3); -static struct attribute *adt7470_attr[] = -{ +static struct attribute *adt7470_attr[] = { &dev_attr_alarm_mask.attr, &dev_attr_num_temp_sensors.attr, &dev_attr_auto_update_interval.attr, @@ -1276,7 +1275,8 @@ static int adt7470_probe(struct i2c_client *client, /* Register sysfs hooks */ data->attrs.attrs = adt7470_attr; - if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs))) + err = sysfs_create_group(&client->dev.kobj, &data->attrs); + if (err) goto exit_free; data->hwmon_dev = hwmon_device_register(&client->dev); |