From: Paul Bolle <pebolle@tiscali.nl>
To: Punnaiah Choudary Kalluri <punnaiah.choudary.kalluri@xilinx.com>
Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
rob@landley.net, michal.simek@xilinx.com,
grant.likely@linaro.org, gregkh@linuxfoundation.org,
jason@lakedaemon.net, ezequiel.garcia@free-electrons.com,
arnd@arndb.de, dwmw2@infradead.org, computersforpeace@gmail.com,
artem.bityutskiy@linux.intel.com, jussi.kivilinna@iki.fi,
acourbot@nvidia.com, ivan.khoronzhuk@ti.com, joern@logfs.org,
devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
kpc528@gmail.com, kalluripunnaiahchoudary@gmail.com,
Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Subject: Re: [PATCH v6 2/2] memory: pl353: Add driver for arm pl353 static memory controller
Date: Mon, 13 Apr 2015 20:49:16 +0200 [thread overview]
Message-ID: <1428950956.3868.16.camel@x220> (raw)
In-Reply-To: <a1f437fe-51cf-4a89-87b4-8f0a305e68ed@BN1AFFO11FD026.protection.gbl>
On Mon, 2015-04-13 at 21:41 +0530, Punnaiah Choudary Kalluri wrote:
> --- a/drivers/memory/Kconfig
> +++ b/drivers/memory/Kconfig
> +config PL353_SMC
> + bool "ARM PL353 Static Memory Controller (SMC) driver"
> + depends on ARM
> + help
> + This driver is for the ARM PL353 Static Memory Controller (SMC)
> + module.
This adds a bool symbol.
> --- a/drivers/memory/Makefile
> +++ b/drivers/memory/Makefile
> +obj-$(CONFIG_PL353_SMC) += pl353-smc.o
Which means pl353-smc.o can never be part of a module, right?
(If that's not right you can stop reading here.)
> --- /dev/null
> +++ b/drivers/memory/pl353-smc.c
> + * This program is free software: you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation, either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
This states the license is GPL v2 or later.
> +#include <linux/module.h>
I wonder whether this include is needed, since this is built-in only
code.
> +MODULE_DEVICE_TABLE(of, pl353_smc_of_match);
According to include/linux/module.h this will be preprocessed away for
built-in code.
> +static struct platform_driver pl353_smc_driver = {
> + .probe = pl353_smc_probe,
> + .remove = pl353_smc_remove,
> + .driver = {
> + .name = "pl353-smc",
> + .owner = THIS_MODULE,
THIS_MODULE will be equivalent to NULL for built-in code, according to
include/linux/export.h.
> + .pm = &pl353_smc_dev_pm_ops,
> + .of_match_table = pl353_smc_of_match,
> + },
> +};
> +module_platform_driver(pl353_smc_driver);
Speaking from memory: for built-in only code this is equivalent to
having a wrapper that only does
register_platform_driver(&pl353_smc_driver);
and mark that wrapper with device_initcall().
> +MODULE_AUTHOR("Xilinx, Inc.");
> +MODULE_DESCRIPTION("ARM PL353 SMC Driver");
> +MODULE_LICENSE("GPL v2");
For built-in only code these macros will be effectively preprocessed
away.
(Would you make PL353_SMC a tristate symbol then you should note that
according to include/linux/module.h "GPL" is the license ident that
matches the license stated in the comment at the top of this file.)
Thanks,
Paul Bolle
next prev parent reply other threads:[~2015-04-13 18:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1428941512-26411-1-git-send-email-punnaia@xilinx.com>
2015-04-13 16:11 ` [PATCH v6 1/2] Devicetree: Add pl353 smc controller devicetree binding information Punnaiah Choudary Kalluri
2015-04-23 19:50 ` Josh Cartwright
2015-04-24 0:46 ` Punnaiah Choudary Kalluri
2015-04-13 16:11 ` [PATCH v6 2/2] memory: pl353: Add driver for arm pl353 static memory controller Punnaiah Choudary Kalluri
2015-04-13 18:49 ` Paul Bolle [this message]
2015-04-14 6:44 ` punnaiah choudary kalluri
2015-04-28 15:11 ` Ben Shelton
2015-04-28 15:58 ` punnaiah choudary kalluri
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=1428950956.3868.16.camel@x220 \
--to=pebolle@tiscali.nl \
--cc=acourbot@nvidia.com \
--cc=arnd@arndb.de \
--cc=artem.bityutskiy@linux.intel.com \
--cc=computersforpeace@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=ezequiel.garcia@free-electrons.com \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=ivan.khoronzhuk@ti.com \
--cc=jason@lakedaemon.net \
--cc=joern@logfs.org \
--cc=jussi.kivilinna@iki.fi \
--cc=kalluripunnaiahchoudary@gmail.com \
--cc=kpc528@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=michal.simek@xilinx.com \
--cc=pawel.moll@arm.com \
--cc=punnaia@xilinx.com \
--cc=punnaiah.choudary.kalluri@xilinx.com \
--cc=rob@landley.net \
--cc=robh+dt@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).