From patchwork Fri May 11 04:15:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haneen Mohammed X-Patchwork-Id: 10393353 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A571A601A0 for ; Fri, 11 May 2018 07:06:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A687128DF5 for ; Fri, 11 May 2018 07:06:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B17228DF8; Fri, 11 May 2018 07:06:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 50C8C28DF5 for ; Fri, 11 May 2018 07:06:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D4BA89EB4; Fri, 11 May 2018 07:05:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 23A836E28A for ; Fri, 11 May 2018 04:15:48 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id h5-v6so3921639wrm.4 for ; Thu, 10 May 2018 21:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=WPx+h6Afuh6IajkibMM7LQMULly+sOUJa7a73xJjWx8=; b=n+2C5xII8mpJSsSnGucO/3vTJng92lXNkR0Hyy0F6hAIW5ksbR9TbcRvquE1P/equz sEcGj2WY+QcXlYkR8hrqSDigrswLS6puvo9sWu0Jy/CkA69jwi8PhEncpzTixzmyDlg/ WYlB10Ga2UOc0J2pJwhSB1OLES7GrdZtmB7ZeTtVDH7431eSo/T6uqPBJZKdfBBc5n1z Faob1NQ6jltVuttGWaqKEjQH89he3ofMGtgsgxJri3SBu3W2msCTzLNy2LRlKJvVX6c3 nQip21ILIpOiGjz74e0whtM3LvifkYZCnpoiFVlBCzHCd4aQUt18GaPg+ZoISXMXvOhn /cpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=WPx+h6Afuh6IajkibMM7LQMULly+sOUJa7a73xJjWx8=; b=qi/McwIZLS5TEjYEotCg9KU9MkTL8KP6u/N2pwWKB3B8hR9SjdRX34/xz9RWZFPbc6 wAVG59WLILfzAuFzW7mQBliWp02lib29iztbAyYPD/iyh3vDEwKXZCNuRkIQqv0KsF1c LqwD7z04Jeq7gSKm423F0XC9MculXNDwKUTFsN5/yAhv3fCf7F2rc2OiSfjMlYEP5aT3 8bjFejEhvX8BH8iJYSAx4gAXl/Wxv7Id+ARCFWTdXjTTk8cwZVI8TDc+1D/Lc7/E6/n6 x8qq+FAmp9658u4GfYtVJNpC9e1+Oi1UTlXPQ6lSKb8x5RMltIBJpnddFHusu8dX/LNq HckQ== X-Gm-Message-State: ALKqPwfIoFauN/3PnA1AKegiVB8vt8Xz+zpRGmPUYoKR5tvf5C55O/tg odviqajKHgTFRU1dhN7wT6wOmTiF X-Google-Smtp-Source: AB8JxZp5JnAcMHvzYZMNki9P9Ar9c9Ht6T9Q36QnGukN3UGMJVm5BRKzXSkUoQMi9m64LmtvQE1Ofg== X-Received: by 2002:adf:8292:: with SMTP id 18-v6mr3110477wrc.38.1526012147211; Thu, 10 May 2018 21:15:47 -0700 (PDT) Received: from haneen-vb ([129.208.138.210]) by smtp.gmail.com with ESMTPSA id u36-v6sm2883336wrf.87.2018.05.10.21.15.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 21:15:46 -0700 (PDT) Date: Fri, 11 May 2018 07:15:42 +0300 From: Haneen Mohammed To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: Match sysfs name in link removal to link creation Message-ID: <20180511041542.GA4253@haneen-vb> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Mailman-Approved-At: Fri, 11 May 2018 07:05:50 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , daniel.vetter@intel.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch matches the sysfs name used in the unlinking with the linking function. Otherwise, remove_compat_control_link() fails to remove sysfs created by create_compat_control_link() in drm_dev_register(). Signed-off-by: Haneen Mohammed --- drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index a1b9338736e3..c2c21d839727 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -716,7 +716,7 @@ static void remove_compat_control_link(struct drm_device *dev) if (!minor) return; - name = kasprintf(GFP_KERNEL, "controlD%d", minor->index); + name = kasprintf(GFP_KERNEL, "controlD%d", minor->index + 64); if (!name) return;