From patchwork Sat Jun 7 03:02:02 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: 4315011 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 1D36D9F358 for ; Sat, 7 Jun 2014 03:01:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44D3620219 for ; Sat, 7 Jun 2014 03:01:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB710201F7 for ; Sat, 7 Jun 2014 03:01:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752614AbaFGDB0 (ORCPT ); Fri, 6 Jun 2014 23:01:26 -0400 Received: from mail-vc0-f181.google.com ([209.85.220.181]:46230 "EHLO mail-vc0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752564AbaFGDBZ (ORCPT ); Fri, 6 Jun 2014 23:01:25 -0400 Received: by mail-vc0-f181.google.com with SMTP id hq11so4126812vcb.12 for ; Fri, 06 Jun 2014 20:01:24 -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=ngLorBhpUbKaFFr8yc5hAdEAf/Zp+7AZhWLMlD5RvgQ=; b=ElRY3j2tCKZQVgojq3DGiyhkCmaOexFH+EX7JXbRscIU638pOwoLKiAfK2H/8Io2p2 FkjSRAwbwK/xLxe4FN8Fz/Um13gW9KvvYEs0uOGpUxBLiGorKORCdeDy8f+P83MY7U4W B4sh+HEzC1L5imZiZPgF4vDzrHjQbjZ1d6+yy9rTOQR54as5gqmbqB0V9McqIqN/6238 DETqepQtDzgORRNuQa22IgYaVH2SZgH5GyGuLwE6cR1TcqmNDpLJ+P0rPf++RMApjBCu zvXi3/xX2k83CyYAZoYCfdHuMot5AAHwWbkofujqQbpSwYSkDiyFxsnIhspKaB5+6+VS 5CAA== X-Gm-Message-State: ALoCoQkTop6wsoX0eI0wm+xwINYyPogjyqOZwkZO9x0cNcJtS3Bo7qvv4TAVr6CZUP6UhX0LhUYA X-Received: by 10.220.137.145 with SMTP id w17mr8185260vct.47.1402110084885; Fri, 06 Jun 2014 20:01:24 -0700 (PDT) Received: from localhost (host18.190-30-94.telecom.net.ar. [190.30.94.18]) by mx.google.com with ESMTPSA id tv3sm21241167vdc.18.2014.06.06.20.01.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jun 2014 20:01:24 -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 3/9] drm/tilcdc: slave: fix dangling sysfs connector node Date: Sat, 7 Jun 2014 00:02:02 -0300 Message-Id: <1402110128-30471-4-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=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: stable@vger.kernel.org --- 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 a37924e..28c8478 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_slave.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_slave.c @@ -176,6 +176,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); }