From patchwork Tue Jun 17 14:17:03 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: 4366271 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 B90ECBEEAA for ; Tue, 17 Jun 2014 14:16:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C0B2E2025B for ; Tue, 17 Jun 2014 14:16:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F0E2202D1 for ; Tue, 17 Jun 2014 14:15:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932873AbaFQOP4 (ORCPT ); Tue, 17 Jun 2014 10:15:56 -0400 Received: from mail-yh0-f51.google.com ([209.85.213.51]:42004 "EHLO mail-yh0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932903AbaFQOPz (ORCPT ); Tue, 17 Jun 2014 10:15:55 -0400 Received: by mail-yh0-f51.google.com with SMTP id f10so5482009yha.24 for ; Tue, 17 Jun 2014 07:15:55 -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=myfGQc7JJ0plvao7OXxw0Dr5h0ModTZwg/7EnxxGCsM=; b=IafGGntVBGQLojJyAvJkEK3iUE6F6NOTpIbIfjBwVQIeYrvM03RJRKiFyxJJnPWwKG H4WH9VahaPnJ6ocgcSo/TvRQ+3STjgL9VFwfBtjUROPDkmTcFDI7CND4z2Fw9G2fH3zS KcnzvrN7Hzfybuf5NX5awyxF01wNKQYLAljV+u7QB/s2rx7cc7N4+8XSipJ/t8EEw9Jz m642VBU+ShKTTVVfi6fupZ+Dpv4QR/YHEGZCD2FdQdCYogbOPZFDXt4yv1zDnqGCjrcz nIKZ9MgspmFS9rP9UVMkqqpsBkBcMzndJhw29FU8GE9nIcGRK9Mky9GxX4Z7wJsPHCE3 3yvA== X-Gm-Message-State: ALoCoQkOsV3kT9c2v1z3CDm2ANoRJGPWYebHapFrPS9Fc2zj/MsYjuCbT84pe/IFGQudT7SBNyqG X-Received: by 10.236.93.195 with SMTP id l43mr46124174yhf.40.1403014555270; Tue, 17 Jun 2014 07:15:55 -0700 (PDT) Received: from localhost (host18.190-30-94.telecom.net.ar. [190.30.94.18]) by mx.google.com with ESMTPSA id k50sm26040728yhc.21.2014.06.17.07.15.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jun 2014 07:15:54 -0700 (PDT) From: =?UTF-8?q?Guido=20Mart=C3=ADnez?= To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Cc: robdclark@gmail.com, =?UTF-8?q?Ezequiel=20Garc=C3=ADa?= , airlied@linux.ie, Daniel Mack , Russell King , Daniel Vetter , =?UTF-8?q?Guido=20Mart=C3=ADnez?= , Subject: [PATCH/RESEND 1/9] drm/i2c: tda998x: move drm_i2c_encoder_destroy call Date: Tue, 17 Jun 2014 11:17:03 -0300 Message-Id: <1403014631-18072-2-git-send-email-guido@vanguardiasur.com.ar> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1403014631-18072-1-git-send-email-guido@vanguardiasur.com.ar> References: <1402110128-30471-1-git-send-email-guido@vanguardiasur.com.ar> <1403014631-18072-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.9 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: #v3.9+ --- 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 240c331..db9515f 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); }