From patchwork Mon Dec 20 19:16:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzianis Kahanovich X-Patchwork-Id: 422151 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBL0RA8q011307 for ; Tue, 21 Dec 2010 00:31:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932877Ab0LTTPY (ORCPT ); Mon, 20 Dec 2010 14:15:24 -0500 Received: from mail.bspu.unibel.by ([195.50.2.21]:49687 "EHLO mail.bspu.local" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932826Ab0LTTPU (ORCPT ); Mon, 20 Dec 2010 14:15:20 -0500 Received: from [10.200.200.1] ([10.200.200.1]) by mail.bspu.local (8.14.4/8.14.4) with ESMTP id oBKJF5VL003794; Mon, 20 Dec 2010 21:15:11 +0200 Message-ID: <4D0FAB7E.1080704@bspu.unibel.by> Date: Mon, 20 Dec 2010 21:16:14 +0200 From: Dzianis Kahanovich Reply-To: mahatma@eu.by User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b7pre) Gecko/20101123 Firefox/4.0b7pre SeaMonkey/2.1b1 MIME-Version: 1.0 To: Florian Tobias Schandinat CC: Paul Mundt , Joseph Chan , linux-fbdev@vger.kernel.org Subject: [PATCH] viafb: fix viafb_find_i2c_adapt return value References: <4CED3DD5.5080405@bspu.unibel.by> <20101130061357.GE17114@linux-sh.org> <4CF8DA25.4020204@bspu.unibel.by> <4CF9879A.3090409@gmx.de> <4D00D508.1060106@bspu.unibel.by> <4D03E177.6060305@gmx.de> <4D0BCEA7.6080509@bspu.unibel.by> In-Reply-To: <4D0BCEA7.6080509@bspu.unibel.by> X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.bspu.local Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Dec 2010 00:31:03 +0000 (UTC) --- a/drivers/video/via/via_i2c.c 2010-12-18 06:42:37.000000000 +0200 +++ b/drivers/video/via/via_i2c.c 2010-12-20 19:55:17.000000000 +0200 @@ -188,7 +188,7 @@ struct i2c_adapter *viafb_find_i2c_adapt { struct via_i2c_stuff *stuff = &via_i2c_par[which]; - return &stuff->adapter; + return stuff->is_active ? &stuff->adapter : NULL; } EXPORT_SYMBOL_GPL(viafb_find_i2c_adapter);