linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dw_spi.c can now be built as a module.
@ 2010-01-21 16:44 Jean-Hugues Deschenes
       [not found] ` <20100121164349.10132.24020.stgit-PR71IgaHmJalNznWqnLNUK6RkeBMCJyt@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Jean-Hugues Deschenes @ 2010-01-21 16:44 UTC (permalink / raw)
  To: Grant Likely; +Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

dw_spi.c can now be built as a module.

Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes-YGVykHU+fedBDgjK7y7TUQ@public.gmane.org>
---
 drivers/spi/Kconfig  |    2 +-
 drivers/spi/dw_spi.c |   11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 02be3a6..505f1c2 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -308,7 +308,7 @@ config SPI_NUC900
 #
 
 config SPI_DESIGNWARE
-	bool "DesignWare SPI controller core support"
+	tristate "DesignWare SPI controller core support"
 	depends on SPI_MASTER
 	help
 	  general driver for SPI controller core from DesignWare
diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c
index 4b5a9a1..754f21c 100644
--- a/drivers/spi/dw_spi.c
+++ b/drivers/spi/dw_spi.c
@@ -940,6 +940,17 @@ int dw_spi_resume_host(struct dw_spi *dws)
 }
 EXPORT_SYMBOL(dw_spi_resume_host);
 
+static int __init dw_spi_init(void)
+{
+	return 0;
+}
+module_init(dw_spi_init);
+
+static void __exit dw_spi_exit(void)
+{
+}
+module_exit(dw_spi_exit);
+
 MODULE_AUTHOR("Feng Tang <feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>");
 MODULE_DESCRIPTION("Driver for DesignWare SPI controller core");
 MODULE_LICENSE("GPL v2");


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] dw_spi.c can now be built as a module.
       [not found] ` <20100121164349.10132.24020.stgit-PR71IgaHmJalNznWqnLNUK6RkeBMCJyt@public.gmane.org>
@ 2010-01-21 16:55   ` Grant Likely
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2010-01-21 16:55 UTC (permalink / raw)
  To: Jean-Hugues Deschenes; +Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Thu, Jan 21, 2010 at 9:44 AM, Jean-Hugues Deschenes
<jean-hugues.deschenes-YGVykHU+fedBDgjK7y7TUQ@public.gmane.org> wrote:
> dw_spi.c can now be built as a module.
>
> Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes-YGVykHU+fedBDgjK7y7TUQ@public.gmane.org>

I've picked this up, but....

> diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c
> index 4b5a9a1..754f21c 100644
> --- a/drivers/spi/dw_spi.c
> +++ b/drivers/spi/dw_spi.c
> @@ -940,6 +940,17 @@ int dw_spi_resume_host(struct dw_spi *dws)
>  }
>  EXPORT_SYMBOL(dw_spi_resume_host);
>
> +static int __init dw_spi_init(void)
> +{
> +       return 0;
> +}
> +module_init(dw_spi_init);
> +
> +static void __exit dw_spi_exit(void)
> +{
> +}
> +module_exit(dw_spi_exit);

Modules are not required to have module_init() and module_exit()
hooks.  I've dropped this chunk.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-21 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-21 16:44 [PATCH] dw_spi.c can now be built as a module Jean-Hugues Deschenes
     [not found] ` <20100121164349.10132.24020.stgit-PR71IgaHmJalNznWqnLNUK6RkeBMCJyt@public.gmane.org>
2010-01-21 16:55   ` Grant Likely

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).