From patchwork Sat Jun 7 03:02:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_Mart=C3=ADnez?= X-Patchwork-Id: 4314971 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A4C84BEEAA for ; Sat, 7 Jun 2014 03:01:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BFC03201E7 for ; Sat, 7 Jun 2014 03:01:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E3D7C201F7 for ; Sat, 7 Jun 2014 03:01:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752563AbaFGDBN (ORCPT ); Fri, 6 Jun 2014 23:01:13 -0400 Received: from mail-vc0-f181.google.com ([209.85.220.181]:42423 "EHLO mail-vc0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752527AbaFGDBM (ORCPT ); Fri, 6 Jun 2014 23:01:12 -0400 Received: by mail-vc0-f181.google.com with SMTP id hq11so4126646vcb.12 for ; Fri, 06 Jun 2014 20:01:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=tUY51tgTbMs690OoR7tavEZKRUUDKLcORjuiM5iiNgs=; b=aCTkQ21xc9lfj+GJVd+nnUbsJZ5dBwGdA1wR4IaZIFj7NyeT+9MgesrhY7EYXZ+ItU 4iVfd2JU54Jq9dqn/iAwjq9r0tc0MnrBaB9KW3478Q3ZR+j3maEQzr+FfkjDIK3IF9mS Qa22YDkJa44mSJ7FOdbf9hxeAEYF6hscc8ctuCIUUHu96rO1C7s5S9IFwXZz3oIqh6Yg cTubawTrOcyHcsom94TSNGXpM6kxqfOoZxqO05PMMaCsKWRXVRU7ki3jy+WWaObPDDNx 7CUbzAikM1FZCZk/rYZ0O/x88ypjX4zUZzM2jsERRT10VP0klXOYa2VNqb989Hi5jXgy msDQ== X-Gm-Message-State: ALoCoQkWBddlpn61fsrt7bfpWJaU5DH+vKcVUNQeazKQHCL21mM2DAq6zV8YAUKXFARKyn3CSta1 X-Received: by 10.58.143.13 with SMTP id sa13mr7731286veb.44.1402110072000; Fri, 06 Jun 2014 20:01:12 -0700 (PDT) Received: from localhost (host18.190-30-94.telecom.net.ar. [190.30.94.18]) by mx.google.com with ESMTPSA id 5sm21257189vdg.8.2014.06.06.20.01.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jun 2014 20:01:10 -0700 (PDT) From: =?UTF-8?q?Guido=20Mart=C3=ADnez?= To: dri-devel@lists.freedesktop.org, linux-arm-kernel@vger.kernel.org, linux-omap@vger.kernel.org Cc: =?UTF-8?q?Ezequiel=20Garc=C3=ADa?= , David Airlie , Russell King , Rob Clark , Tony Lindgren , Daniel Mack , =?UTF-8?q?Guido=20Mart=C3=ADnez?= , stable@vger.kernel.org Subject: [PATCH 1/9] drm/i2c: tda998x: move drm_i2c_encoder_destroy call Date: Sat, 7 Jun 2014 00:02:00 -0300 Message-Id: <1402110128-30471-2-git-send-email-guido@vanguardiasur.com.ar> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: <1402110128-30471-1-git-send-email-guido@vanguardiasur.com.ar> References: <1402110128-30471-1-git-send-email-guido@vanguardiasur.com.ar> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Currently tda998x_encoder_destroy() calls cec_write() and reg_clear(), as part of the release procedure. Such calls need to access the I2C bus and therefore, we need to call them before drm_i2c_encoder_destroy() which unregisters the I2C device. This commit moves the latter so it's done afterwards. Signed-off-by: Guido Martínez Signed-off-by: Ezequiel García Cc: stable@vger.kernel.org --- drivers/gpu/drm/i2c/tda998x_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 219c7e8..d06eff6 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -1183,7 +1183,6 @@ static void tda998x_encoder_destroy(struct drm_encoder *encoder) { struct tda998x_priv *priv = to_tda998x_priv(encoder); - drm_i2c_encoder_destroy(encoder); /* disable all IRQs and free the IRQ handler */ cec_write(priv, REG_CEC_RXSHPDINTENA, 0); @@ -1193,6 +1192,7 @@ tda998x_encoder_destroy(struct drm_encoder *encoder) if (priv->cec) i2c_unregister_device(priv->cec); + drm_i2c_encoder_destroy(encoder); kfree(priv); }