From: Mark M. Hoffman Date: Thu, 11 Oct 2007 02:32:50 +0000 (-0400) Subject: hwmon: (dme1737) Fix some merge conflicts X-Git-Tag: v2.6.24-rc1~1299^2~8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62ee3e10d3ea11f50bcec8dffb46555fa16d417b;p=linux-2.6 hwmon: (dme1737) Fix some merge conflicts class_dev -> hwmon_dev Signed-off-by: Mark M. Hoffman --- 62ee3e10d3ea11f50bcec8dffb46555fa16d417b diff --cc drivers/hwmon/dme1737.c index 14ebbfb3b1,63cee3b6f9..ec8edd2a8c --- a/drivers/hwmon/dme1737.c +++ b/drivers/hwmon/dme1737.c @@@ -1983,9 -2041,10 +2041,10 @@@ static int dme1737_i2c_detect(struct i2 } /* Register device */ - data->hwmon_dev = hwmon_device_register(&client->dev); - data->class_dev = hwmon_device_register(dev); - if (IS_ERR(data->class_dev)) { ++ data->hwmon_dev = hwmon_device_register(dev); + if (IS_ERR(data->hwmon_dev)) { + dev_err(dev, "Failed to register device.\n"); - err = PTR_ERR(data->class_dev); + err = PTR_ERR(data->hwmon_dev); goto exit_remove; } @@@ -2022,29 -2066,16 +2066,16 @@@ static int dme1737_i2c_attach_adapter(s return 0; } - return i2c_probe(adapter, &addr_data, dme1737_detect); + return i2c_probe(adapter, &addr_data, dme1737_i2c_detect); } - static int dme1737_detach_client(struct i2c_client *client) + static int dme1737_i2c_detach_client(struct i2c_client *client) { struct dme1737_data *data = i2c_get_clientdata(client); - int ix, err; + int err; - hwmon_device_unregister(data->class_dev); + hwmon_device_unregister(data->hwmon_dev); - - for (ix = 0; ix < ARRAY_SIZE(dme1737_fan_group); ix++) { - if (data->has_fan & (1 << ix)) { - sysfs_remove_group(&client->dev.kobj, - &dme1737_fan_group[ix]); - } - } - for (ix = 0; ix < ARRAY_SIZE(dme1737_pwm_group); ix++) { - if (data->has_pwm & (1 << ix)) { - sysfs_remove_group(&client->dev.kobj, - &dme1737_pwm_group[ix]); - } - } - sysfs_remove_group(&client->dev.kobj, &dme1737_group); + dme1737_remove_files(&client->dev); if ((err = i2c_detach_client(client))) { return err;