From patchwork Tue Oct 20 14:32:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 533000 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 347B51402B4 for ; Wed, 21 Oct 2015 01:32:37 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752150AbbJTOcf (ORCPT ); Tue, 20 Oct 2015 10:32:35 -0400 Received: from down.free-electrons.com ([37.187.137.238]:56720 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752647AbbJTOcf (ORCPT ); Tue, 20 Oct 2015 10:32:35 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id 2E002EE0; Tue, 20 Oct 2015 16:32:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (AToulouse-657-1-1073-161.w92-134.abo.wanadoo.fr [92.134.79.161]) by mail.free-electrons.com (Postfix) with ESMTPSA id EA632E; Tue, 20 Oct 2015 16:32:32 +0200 (CEST) From: Thomas Petazzoni To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Tawfik Bayouk , Nadav Haklai , Lior Amsalem , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Marcin Wojtas , Hezi , stable@vger.kernel.org, Thomas Petazzoni Subject: [PATCH] i2c: mv64xxx: really allow I2C offloading Date: Tue, 20 Oct 2015 16:32:24 +0200 Message-Id: <1445351544-26062-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.6.2 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org From: Hezi Commit 00d8689b85a7 ("i2c: mv64xxx: rework offload support to fix several problems") completely reworked the offload support, but stupidly left a debugging-related "return false" at the beginning of the mv64xxx_i2c_can_offload() function. This has the unfortunate consequence that offloading is in fact never used, which wasn't really the intention. This commit fixes that problem by removing the stupid "return false". Fixes: 00d8689b85a7 ("i2c: mv64xxx: rework offload support to fix several problems") Cc: Signed-off-by: Hezi [Thomas: reworked commit log and title.] Signed-off-by: Thomas Petazzoni --- Note: the original fix is from Hezi, but I rewrote the commit log, which is why I authorized myself to treat my own work as being "stupid". Which it really was. --- drivers/i2c/busses/i2c-mv64xxx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index 30059c1..5801227 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c @@ -669,8 +669,6 @@ mv64xxx_i2c_can_offload(struct mv64xxx_i2c_data *drv_data) struct i2c_msg *msgs = drv_data->msgs; int num = drv_data->num_msgs; - return false; - if (!drv_data->offload_enabled) return false;