mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dragan Cvetic <draganc@xilinx.com>
To: Harshal Chaudhari <harshalchau04@gmail.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: Derek Kiernan <dkiernan@xilinx.com>,
	"arnd@arndb.de" <arnd@arndb.de>,
	Michal Simek <michals@xilinx.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] misc: xilinx-sdfec: convert to module_platform_driver()
Date: Mon, 11 May 2020 14:12:21 +0000	[thread overview]
Message-ID: <DM6PR02MB41406B5BD7A4379F73ECEB12CBA10@DM6PR02MB4140.namprd02.prod.outlook.com> (raw)
In-Reply-To: <20200510164308.31358-1-harshalchau04@gmail.com>



> -----Original Message-----
> From: Harshal Chaudhari <harshalchau04@gmail.com>
> Sent: Sunday 10 May 2020 17:43
> To: gregkh@linuxfoundation.org
> Cc: Derek Kiernan <dkiernan@xilinx.com>; Dragan Cvetic <draganc@xilinx.com>; arnd@arndb.de; Michal Simek
> <michals@xilinx.com>; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; harshalchau04@gmail.com
> Subject: [PATCH] misc: xilinx-sdfec: convert to module_platform_driver()
> 
> The driver init and exit function don't do anything besides registering
> and unregistering the platform driver, so the module_platform_driver()
> macro could just be used instead of having separate functions.
> 
> Signed-off-by: Harshal Chaudhari <harshalchau04@gmail.com>
> ---
>  drivers/misc/xilinx_sdfec.c | 20 +-------------------
>  1 file changed, 1 insertion(+), 19 deletions(-)
> 
> diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
> index 71bbaa56bdb5..db16a42c66f4 100644
> --- a/drivers/misc/xilinx_sdfec.c
> +++ b/drivers/misc/xilinx_sdfec.c
> @@ -1484,25 +1484,7 @@ static struct platform_driver xsdfec_driver = {
>  	.remove =  xsdfec_remove,
>  };
> 
> -static int __init xsdfec_init(void)
> -{
> -	int err;
> -
> -	err = platform_driver_register(&xsdfec_driver);
> -	if (err < 0) {
> -		pr_err("%s Unabled to register SDFEC driver", __func__);
> -		return err;
> -	}
> -	return 0;
> -}
> -
> -static void __exit xsdfec_exit(void)
> -{
> -	platform_driver_unregister(&xsdfec_driver);
> -}
> -
> -module_init(xsdfec_init);
> -module_exit(xsdfec_exit);
> +module_platform_driver(xsdfec_driver);
> 
>  MODULE_AUTHOR("Xilinx, Inc");
>  MODULE_DESCRIPTION("Xilinx SD-FEC16 Driver");
> --
> 2.17.1

Acked-by: Dragan Cvetic <dragan.cvetic@xilinx.com>

Thanks
Dragan

      reply	other threads:[~2020-05-11 14:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-10 16:43 Harshal Chaudhari
2020-05-11 14:12 ` Dragan Cvetic [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=DM6PR02MB41406B5BD7A4379F73ECEB12CBA10@DM6PR02MB4140.namprd02.prod.outlook.com \
    --to=draganc@xilinx.com \
    --cc=arnd@arndb.de \
    --cc=dkiernan@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=harshalchau04@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michals@xilinx.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®