From patchwork Tue Jun 17 14:17:05 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: 4366311 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 23FD39F26E for ; Tue, 17 Jun 2014 14:16:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3C90C20303 for ; Tue, 17 Jun 2014 14:16:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60671202FE for ; Tue, 17 Jun 2014 14:16:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932980AbaFQOQK (ORCPT ); Tue, 17 Jun 2014 10:16:10 -0400 Received: from mail-yh0-f47.google.com ([209.85.213.47]:55316 "EHLO mail-yh0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932903AbaFQOQJ (ORCPT ); Tue, 17 Jun 2014 10:16:09 -0400 Received: by mail-yh0-f47.google.com with SMTP id v1so5507464yhn.6 for ; Tue, 17 Jun 2014 07:16:08 -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=eYs08fwpcaPVC4Bj1Nn2b0NdxHiHqpAJ6buPO63czGI=; b=jKAh20yu2cf2FUG4ienQ21nYC67+StF2wV4cgsY+TMvN4gKy/K/1E+k8+qE+5XOWhy IfM4eOvpLZIYL+LzkuhrZkyLQVzqI6KtAF9SlNYoWRBLq+3bGivrSa0lw9lX+6Lv+n9d /AATrOY2Pil56S3eDP2stDjNCAkYDPGxbZrUc+j+Gj9u2ytsK0JHGxbjJu4L3j5YNCDc ME3ZvUVx0sQjjXDsVPJsIwmsdISBIs5MDDNveLMj9w5qDlWX8l6jmaG5LMSlqQPHaVqR uww7X8p3Rg48xQIHtLNJ0UhnSLSOLzYgk4LW+E2NIiTiHLZUifkTlCQG7Vztsy01nHn1 x3sg== X-Gm-Message-State: ALoCoQnEBjrfCPbAhL2NxL7V2N1DnjYpPDpt+VGzvN0cPoIlUIS4kXcEUA51OoWSQ8tofOvQd2E7 X-Received: by 10.236.142.13 with SMTP id h13mr3375946yhj.155.1403014568229; Tue, 17 Jun 2014 07:16:08 -0700 (PDT) Received: from localhost (host18.190-30-94.telecom.net.ar. [190.30.94.18]) by mx.google.com with ESMTPSA id o69sm26043144yho.19.2014.06.17.07.16.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jun 2014 07:16:07 -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 3/9] drm/tilcdc: slave: fix dangling sysfs connector node Date: Tue, 17 Jun 2014 11:17:05 -0300 Message-Id: <1403014631-18072-4-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=unavailable 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 Add a drm_sysfs_connector_remove call when we destroy the panel to make sure the connector node in sysfs gets deleted. This is required for proper unload and re-load of this driver as a module. Without this, we would get a warning at re-load time like so: tda998x 0-0070: found TDA19988 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 825 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x54/0x74() sysfs: cannot create duplicate filename '/class/drm/card0-HDMI-A-1' Modules linked in: [..] CPU: 0 PID: 825 Comm: modprobe Not tainted 3.15.0-rc4-00027-g9dcdef4 #82 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (warn_slowpath_common+0x68/0x88) [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) [] (warn_slowpath_fmt) from [] (sysfs_warn_dup+0x54/0x74) [] (sysfs_warn_dup) from [] (sysfs_do_create_link_sd.isra.2+0xb0/0xb8) [] (sysfs_do_create_link_sd.isra.2) from [] (device_add+0x338/0x520) [] (device_add) from [] (device_create_groups_vargs+0xa0/0xc4) [] (device_create_groups_vargs) from [] (device_create+0x24/0x2c) [] (device_create) from [] (drm_sysfs_connector_add+0x64/0x204) [] (drm_sysfs_connector_add) from [] (slave_modeset_init+0x120/0x1bc [tilcdc]) [] (slave_modeset_init [tilcdc]) from [] (tilcdc_load+0x214/0x4c0 [tilcdc]) [] (tilcdc_load [tilcdc]) from [] (drm_dev_register+0xa4/0x104) [..snip..] ---[ end trace 4df8d614936ebdee ]--- [drm:drm_sysfs_connector_add] *ERROR* failed to register connector device: -17 Signed-off-by: Guido Martínez Cc: #v3.9+ --- drivers/gpu/drm/tilcdc/tilcdc_slave.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave.c b/drivers/gpu/drm/tilcdc/tilcdc_slave.c index 595068b..2f83ffb 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_slave.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_slave.c @@ -166,6 +166,7 @@ struct slave_connector { static void slave_connector_destroy(struct drm_connector *connector) { struct slave_connector *slave_connector = to_slave_connector(connector); + drm_sysfs_connector_remove(connector); drm_connector_cleanup(connector); kfree(slave_connector); }