From: Daniel Vetter <daniel@ffwll.ch>
To: Qinglang Miao <miaoqinglang@huawei.com>
Cc: Eric Anholt <eric@anholt.net>, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/v3d: convert to use module_platform_driver
Date: Mon, 10 Aug 2020 15:13:16 +0200 [thread overview]
Message-ID: <20200810131316.GV2352366@phenom.ffwll.local> (raw)
In-Reply-To: <20200810125931.186456-1-miaoqinglang@huawei.com>
On Mon, Aug 10, 2020 at 08:59:31PM +0800, Qinglang Miao wrote:
> Get rid of boilerplate code by using module_platform_driver macro
> for v3d_drm.
>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
lgtm, merged to drm-misc-next for 5.10
-Daniel
> ---
> drivers/gpu/drm/v3d/v3d_drv.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
> index 82a7dfdd1..9f7c26193 100644
> --- a/drivers/gpu/drm/v3d/v3d_drv.c
> +++ b/drivers/gpu/drm/v3d/v3d_drv.c
> @@ -358,18 +358,7 @@ static struct platform_driver v3d_platform_driver = {
> },
> };
>
> -static int __init v3d_drm_register(void)
> -{
> - return platform_driver_register(&v3d_platform_driver);
> -}
> -
> -static void __exit v3d_drm_unregister(void)
> -{
> - platform_driver_unregister(&v3d_platform_driver);
> -}
> -
> -module_init(v3d_drm_register);
> -module_exit(v3d_drm_unregister);
> +module_platform_driver(v3d_platform_driver);
>
> MODULE_ALIAS("platform:v3d-drm");
> MODULE_DESCRIPTION("Broadcom V3D DRM Driver");
> --
> 2.25.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
prev parent reply other threads:[~2020-08-10 13:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 12:59 Qinglang Miao
2020-08-10 13:13 ` Daniel Vetter [this message]
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=20200810131316.GV2352366@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miaoqinglang@huawei.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
all inboxes | Powered by JetHome®