@@ -58,14 +58,14 @@ static int adxl34x_i2c_read_block(struct device *dev,
return 0;
}
-static const struct adxl34x_bus_ops adx134x_smbus_bops = {
+static const struct adxl34x_bus_ops adxl34x_smbus_bops = {
.bustype = BUS_I2C,
.write = adxl34x_smbus_write,
.read = adxl34x_smbus_read,
.read_block = adxl34x_smbus_read_block,
};
-static const struct adxl34x_bus_ops adx134x_i2c_bops = {
+static const struct adxl34x_bus_ops adxl34x_i2c_bops = {
.bustype = BUS_I2C,
.write = adxl34x_smbus_write,
.read = adxl34x_smbus_read,
@@ -88,7 +88,7 @@ static int __devinit adxl34x_i2c_probe(struct i2c_client *client,
ac = adxl34x_probe(&client->dev, client->irq, false,
i2c_check_functionality(client->adapter,
I2C_FUNC_SMBUS_READ_I2C_BLOCK) ?
- &adx134x_smbus_bops : &adx134x_i2c_bops);
+ &adxl34x_smbus_bops : &adxl34x_i2c_bops);
if (IS_ERR(ac))
return PTR_ERR(ac);
@@ -514,6 +514,7 @@ static ssize_t adxl34x_calibrate_store(struct device *dev,
ac->hwcal.y -= (ac->saved.y / 4);
ac->swcal.y = ac->saved.y % 4;
+ ac->hwcal.z -= (ac->saved.z / 4);
ac->swcal.z = ac->saved.z % 4;
AC_WRITE(ac, OFSX, (s8) ac->hwcal.x);
@@ -724,7 +725,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq,
pdata = &ac->pdata;
ac->input = input_dev;
- ac->disabled = true;
+ ac->disabled = false;
ac->dev = dev;
ac->irq = irq;
ac->bops = bops;