Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3302750pxu; Tue, 15 Dec 2020 03:54:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpreivDxh2IsR1iK5qpFqvXs2ZwtFgY27P8onT04CfTYN8qdybnM9pTUxGF2GZLlte8ReG X-Received: by 2002:aa7:cd44:: with SMTP id v4mr29275290edw.156.1608033249098; Tue, 15 Dec 2020 03:54:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608033249; cv=none; d=google.com; s=arc-20160816; b=Mq52LV+lhZf8NeYTseweqFWz26AOvHEq11sl9QSiVHgOz/4CnyvopL5k7SREE6LtTB wg1ysrDkCR9sqEa4QZUN+ZDGvsOj7xj+lp6rfvNusHiWhVbeN+x6a75nkLvLn6OqQo4s 3Ejquo/VhoQw2L4Vrp04ob5AJlRYCetUh+PmTj7s5dXQwl64dxd5SOoYc79CwFPnAVgz j9wkkByt5jhWHZPLCtZZIOr2QQa4k0x7VTqdxYaavwr5UX5RXlMjQQvY+PV3F6IZiVnr 5x4p9LTYd6e+HZJgtztO/bWE+e4HfNR7OvYQS5P/eLymyFrj4va+2iUz5yCw/vw6+1py ZY8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=KlngvMg6EGJAA9uwbJQZx6XqAd5TvqlC+QbqpHOKfCs=; b=uNA3uJSHCqHHax1ylNRWhiST2tb5IPPiTIY5QAZris9rwaaHW74doGVBLYUa8jK5tm WlYBrF55OY8IzmDVsr3PJLL3sEcQshhpyq5Hz1QbVUOdQLm4xxFKx+UqWwMA0LB9OTm1 qq81YvPBm/ECbINA999QDPpgiaTLqRiqf6F0QweAzCLgzNL8ZiJjwNnGsqULameYKzRo v0Sg6zdRLPApfWypC5raZq5/HwumHqTV6KxuFm6oVTsVT3s5KvcXu6k/U+Z8eMnVuvSQ KE5FoyHmzflsoRgf+EgKWwoU+Xn4i1tVZynudbih0V4BUEMnwHgLUJmPlLfpqFN6M/e5 QRjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dv23si727100ejb.408.2020.12.15.03.53.46; Tue, 15 Dec 2020 03:54:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728606AbgLOLtz (ORCPT + 99 others); Tue, 15 Dec 2020 06:49:55 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:9892 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727807AbgLOLtv (ORCPT ); Tue, 15 Dec 2020 06:49:51 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4CwGjb2lChz7Gds; Tue, 15 Dec 2020 19:48:19 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Tue, 15 Dec 2020 19:48:45 +0800 From: Tian Tao To: , , , , , , , , CC: Tian Tao Subject: [PATCH drm/hisilicon 2/2] drm/hisilicon: Use the new api devm_drm_msi_install Date: Tue, 15 Dec 2020 19:48:53 +0800 Message-ID: <1608032933-50187-3-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1608032933-50187-1-git-send-email-tiantao6@hisilicon.com> References: <1608032933-50187-1-git-send-email-tiantao6@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_drm_msi_install to enable pci msi so that pci_disable_msi is not called when hibmc is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 7e91ef1..21f8225 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c @@ -251,7 +251,6 @@ static int hibmc_hw_init(struct hibmc_drm_private *priv) static int hibmc_unload(struct drm_device *dev) { drm_atomic_helper_shutdown(dev); - pci_disable_msi(dev->pdev); return 0; } @@ -282,7 +281,7 @@ static int hibmc_load(struct drm_device *dev) goto err; } - ret = pci_enable_msi(dev->pdev); + ret = devm_drm_msi_install(dev); if (ret) { drm_warn(dev, "enabling MSI failed: %d\n", ret); } else { -- 2.7.4