Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: xinliang <z.liuxinliang@hisilicon.com>
To: YueHaibing <yuehaibing@huawei.com>, dri-devel@lists.freedesktop.org
Cc: zourongrong@gmail.com, daniel.vetter@ffwll.ch,
	intel-gfx@lists.freedesktop.org, puck.chen@hisilicon.com
Subject: Re: [PATCH] drm/hisilicon/hibmc: Using module_pci_driver.
Date: Mon, 23 Apr 2018 11:14:23 +0800	[thread overview]
Message-ID: <5ADD4F8F.9080903@hisilicon.com> (raw)
In-Reply-To: <20180421095148.17840-1-yuehaibing@huawei.com>



On 2018/4/21 17:51, YueHaibing wrote:
> Remove boilerplate code by using macro module_pci_driver.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Thanks Haibing,

Reviewed-by: Xinliang Liu <z.liuxinliang@hisilicon.com>

Xinliang

> ---
>   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 13 +------------
>   1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> index d4f6f1f..68d80c1 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> @@ -414,18 +414,7 @@ static struct pci_driver hibmc_pci_driver = {
>   	.driver.pm =    &hibmc_pm_ops,
>   };
>   
> -static int __init hibmc_init(void)
> -{
> -	return pci_register_driver(&hibmc_pci_driver);
> -}
> -
> -static void __exit hibmc_exit(void)
> -{
> -	return pci_unregister_driver(&hibmc_pci_driver);
> -}
> -
> -module_init(hibmc_init);
> -module_exit(hibmc_exit);
> +module_pci_driver(hibmc_pci_driver);
>   
>   MODULE_DEVICE_TABLE(pci, hibmc_pci_table);
>   MODULE_AUTHOR("RongrongZou <zourongrong@huawei.com>");


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-04-23  3:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-21  9:51 [PATCH] drm/hisilicon/hibmc: Using module_pci_driver YueHaibing
2018-04-23  3:14 ` xinliang [this message]
2018-04-23 13:19 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-04-23 18:13 ` ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ADD4F8F.9080903@hisilicon.com \
    --to=z.liuxinliang@hisilicon.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=puck.chen@hisilicon.com \
    --cc=yuehaibing@huawei.com \
    --cc=zourongrong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox