From patchwork Tue Sep 15 13:12:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 7184831 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EC087BEEC1 for ; Tue, 15 Sep 2015 13:14:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 14B3B205EF for ; Tue, 15 Sep 2015 13:14:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1FDD206E2 for ; Tue, 15 Sep 2015 13:14:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751855AbbIONOE (ORCPT ); Tue, 15 Sep 2015 09:14:04 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:52849 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567AbbIONOC (ORCPT ); Tue, 15 Sep 2015 09:14:02 -0400 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Zbq2L-0006MB-LV from Vladimir_Zapolskiy@mentor.com ; Tue, 15 Sep 2015 06:12:41 -0700 Received: from eyas.fin.mentorg.com (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 15 Sep 2015 14:12:40 +0100 From: Vladimir Zapolskiy To: Tomi Valkeinen CC: Jean-Christophe Plagniol-Villard , , Subject: [PATCH v2] fbdev: omap2: connector-dvi: use of_get_i2c_adapter_by_node interface Date: Tue, 15 Sep 2015 16:12:33 +0300 Message-ID: <1442322753-32043-1-git-send-email-vladimir_zapolskiy@mentor.com> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 X-Originating-IP: [137.202.0.76] Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This change is needed to properly lock I2C bus driver, which serves DDC. Prior to this change i2c_put_adapter() is misused, which may lead to an overflow over zero of I2C bus driver user counter. Signed-off-by: Vladimir Zapolskiy --- Changes from v1 to v2: - none, v1 is http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/354990.html The original series http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/354982.html is separated to i2c, dri and fbdev parts, at the moment i2c part with new of_get_i2c_adapter_by_node() interface has been applied. drivers/video/fbdev/omap2/displays-new/connector-dvi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap2/displays-new/connector-dvi.c b/drivers/video/fbdev/omap2/displays-new/connector-dvi.c index a8ce920..d811e6d 100644 --- a/drivers/video/fbdev/omap2/displays-new/connector-dvi.c +++ b/drivers/video/fbdev/omap2/displays-new/connector-dvi.c @@ -294,7 +294,7 @@ static int dvic_probe_of(struct platform_device *pdev) adapter_node = of_parse_phandle(node, "ddc-i2c-bus", 0); if (adapter_node) { - adapter = of_find_i2c_adapter_by_node(adapter_node); + adapter = of_get_i2c_adapter_by_node(adapter_node); if (adapter == NULL) { dev_err(&pdev->dev, "failed to parse ddc-i2c-bus\n"); omap_dss_put_device(ddata->in);