From patchwork Wed Dec 22 08:28:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 12691267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E368C433F5 for ; Wed, 22 Dec 2021 08:29:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC9AE1126D4; Wed, 22 Dec 2021 08:28:53 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 08FFE10F4D9 for ; Wed, 22 Dec 2021 08:28:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640161729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5EHgB4jt8VzQ3WZ6ERGEVuhUukhc+8h/a/zrx+jNmtA=; b=gGCOVWs8dt5KthfWtDNgssxxlDusz6AGdEoF58AOuTXU3U3qOelIGTRrJdhXBMGCzWYlIb T4w/GKpmR8EpYbqXMDGfmqRvYF7RvWJFWXkMBxQVX2JaXtWNeVLEKcM2D+645+svRdx9CY 5e2bh7d3eSAEga5qxxVO28z733zbYk8= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-99-DlXe_aNjPAi62h5bXPBOng-1; Wed, 22 Dec 2021 03:28:47 -0500 X-MC-Unique: DlXe_aNjPAi62h5bXPBOng-1 Received: by mail-wm1-f69.google.com with SMTP id z13-20020a05600c0a0d00b003457d6619f8so434538wmp.1 for ; Wed, 22 Dec 2021 00:28:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5EHgB4jt8VzQ3WZ6ERGEVuhUukhc+8h/a/zrx+jNmtA=; b=ZTFYi9bL5CA6n4Ea9InXQjGdcAH8wmHRwZOl5Zg4Of1uRjpfFjLLMCdR+2Kfnh0hFd 9nwjI1nYgVkVg2+gZ0KVJjR+ma9cnkedv1Ru29WCdFsVkFtJAmxac5Qnzy4IDuu92itq lQ9o+xHGO3xV9jzSQD8HfZXeR1YadBXgA8yfC7O+60VkFsGqb246cdnG+X9AzOdLVPfF FYZpHtVuWA8e5Yx9Gf5/hQIwk4ag8UTAbJY90K0QUqpcVEigXJpe2CJJ/P4o3USoQsET q3nMRlATbaoxyP2PwPUPCIUA3yy2jW+hw12pDaRyIlO3nSlgNE665ddEdzfAhjoHUx9w oJCg== X-Gm-Message-State: AOAM533sA22Plc36vGjhwbnnTF/w+QaRpYG7wXhnOvKSKkhSPbw8wPwp sNry/Qp6EGw+kmqTClNayuH2wB0PNFi/RXnRNie/06Jyj3ruJ48Z5KD0AdBRyptAoPyJ5gJB+q7 itgo9QNbFdos/kh75Ye0ti1fhbbEj X-Received: by 2002:a05:600c:1c20:: with SMTP id j32mr104010wms.1.1640161726558; Wed, 22 Dec 2021 00:28:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxao6fS2/g74UosGgsoqKJfq1VcVJQsZJi/iDWRRvOhWbuaBqYMNZKeV5b54IyJARY9L/JEgg== X-Received: by 2002:a05:600c:1c20:: with SMTP id j32mr104003wms.1.1640161726400; Wed, 22 Dec 2021 00:28:46 -0800 (PST) Received: from minerva.home ([92.176.231.205]) by smtp.gmail.com with ESMTPSA id m17sm1247080wrz.91.2021.12.22.00.28.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Dec 2021 00:28:46 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 05/10] drm/hisilicon/hibmc: Replace module initialization with DRM helpers Date: Wed, 22 Dec 2021 09:28:26 +0100 Message-Id: <20211222082831.196562-6-javierm@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211222082831.196562-1-javierm@redhat.com> References: <20211222082831.196562-1-javierm@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , David Airlie , Chen Feng , Javier Martinez Canillas , Xinliang Liu , Xinwei Kong , Tian Tao Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Thomas Zimmermann Replace module_pci_driver() with drm_module_pci_driver(). The DRM macro respects drm_firmware_drivers_only() and fails if the flag has been set. Signed-off-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas --- (no changes since v1) drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 610fc8e135f9..fe4269c5aa0a 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include "hibmc_drm_drv.h" @@ -379,7 +380,7 @@ static struct pci_driver hibmc_pci_driver = { .driver.pm = &hibmc_pm_ops, }; -module_pci_driver(hibmc_pci_driver); +drm_module_pci_driver(hibmc_pci_driver); MODULE_DEVICE_TABLE(pci, hibmc_pci_table); MODULE_AUTHOR("RongrongZou ");