From patchwork Thu Jul 1 09:15:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hennerich, Michael" X-Patchwork-Id: 109022 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o619FKpS008413 for ; Thu, 1 Jul 2010 09:15:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754579Ab0GAJPT (ORCPT ); Thu, 1 Jul 2010 05:15:19 -0400 Received: from nwd2mail11.analog.com ([137.71.25.57]:11198 "EHLO nwd2mail11.analog.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754576Ab0GAJPS convert rfc822-to-8bit (ORCPT ); Thu, 1 Jul 2010 05:15:18 -0400 Cc: Mike Frysinger , "linux-input@vger.kernel.org" , "uclinux-dist-devel@blackfin.uclinux.org" , Chris Verges , Luotao Fu , "Song, Barry" X-IronPort-AV: E=Sophos;i="4.53,518,1272859200"; d="scan'208";a="18727413" Received: from nwd2hubcas2.ad.analog.com ([10.64.73.30]) by nwd2mail11.analog.com with ESMTP; 01 Jul 2010 05:15:17 -0400 Received: from limkHubCAS2.ad.analog.com (10.32.51.141) by NWD2HUBCAS2.ad.analog.com (10.64.73.30) with Microsoft SMTP Server (TLS) id 8.1.358.0; Thu, 1 Jul 2010 05:15:16 -0400 Received: from LIMKCMBX1.ad.analog.com ([169.254.1.88]) by limkHubCAS2.ad.analog.com ([10.32.51.141]) with mapi; Thu, 1 Jul 2010 10:15:13 +0100 From: "Hennerich, Michael" To: Dmitry Torokhov Date: Thu, 1 Jul 2010 10:15:11 +0100 Subject: RE: [PATCH v3] input/misc: new ADXL345/346 driver Thread-Topic: [PATCH v3] input/misc: new ADXL345/346 driver Thread-Index: AcsY8n6CXT0LZ8LhToa9eg3AIK5hOwAClzqg Message-ID: <544AC56F16B56944AEC3BD4E3D5917712E66DFF76E@LIMKCMBX1.ad.analog.com> References: <1255517680-30733-1-git-send-email-vapier@gentoo.org> <1256028039-15044-1-git-send-email-vapier@gentoo.org> <20100625071425.GA631@core.coreip.homeip.net> <544AC56F16B56944AEC3BD4E3D5917712E66DFEF69@LIMKCMBX1.ad.analog.com> <20100701075316.GA14696@core.coreip.homeip.net> In-Reply-To: <20100701075316.GA14696@core.coreip.homeip.net> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 01 Jul 2010 09:15:21 +0000 (UTC) diff --git a/drivers/input/misc/adxl34x-i2c.c b/drivers/input/misc/adxl34x-i2c.c index b1b8df3..0779724 100644 --- a/drivers/input/misc/adxl34x-i2c.c +++ b/drivers/input/misc/adxl34x-i2c.c @@ -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); diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c index 2706ea0..756f4d0 100644 --- a/drivers/input/misc/adxl34x.c +++ b/drivers/input/misc/adxl34x.c @@ -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;