From patchwork Thu Nov 21 01:51:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Airlie X-Patchwork-Id: 3216321 Return-Path: X-Original-To: patchwork-dri-devel@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 ECFD3C045B for ; Thu, 21 Nov 2013 02:07:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2BF720780 for ; Thu, 21 Nov 2013 02:07:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 150162077F for ; Thu, 21 Nov 2013 02:07:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D5F5FA885; Wed, 20 Nov 2013 18:07:18 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 303 seconds by postgrey-1.32 at gabe; Wed, 20 Nov 2013 18:07:11 PST Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [150.101.137.129]) by gabe.freedesktop.org (Postfix) with ESMTP id 6CE9CF9EAE for ; Wed, 20 Nov 2013 18:07:11 -0800 (PST) Received: from ppp118-208-53-211.lns20.bne1.internode.on.net (HELO optimus.redhat.com) ([118.208.53.211]) by ipmail06.adl2.internode.on.net with ESMTP; 21 Nov 2013 12:32:07 +1030 From: Dave Airlie To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/sysfs: fix hotplug regression since lifetime changes Date: Thu, 21 Nov 2013 11:51:04 +1000 Message-Id: <1384998664-5680-1-git-send-email-airlied@gmail.com> X-Mailer: git-send-email 1.8.1.4 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,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 5bdebb183c9702a8c57a01dff09337be3de337a6 changed the lifetimes, but it also meant we no longer set the device_type field properly, so the hotplug events in userspace weren't fully formed enough for drivers to care. Reported-by: Jesse Barnes Signed-off-by: Dave Airlie --- drivers/gpu/drm/drm_sysfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index 1a35ea5..c6a3902 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -516,6 +516,7 @@ int drm_sysfs_device_add(struct drm_minor *minor) DRM_ERROR("device create failed %ld\n", PTR_ERR(minor->kdev)); return PTR_ERR(minor->kdev); } + minor->kdev->type = &drm_sysfs_device_minor; return 0; }