LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Miguel Botón" <mboton@gmail.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	oakad@exemail.com.au, linux-kernel@vger.kernel.org,
	Alex Dubov <oakad@yahoo.com>
Subject: Re: [PATCH] [MEMSTICK] Initial commit for Sony MemoryStick support
Date: Sun, 13 Jan 2008 23:47:24 +0100	[thread overview]
Message-ID: <478A94FC.1050607@gmail.com> (raw)

This happens when trying to compile memory stick support inside the kernel.

drivers/memstick/core/mspro_block.o: In function `memstick_priv':
mspro_block.c:(.text+0x0): multiple definition of `memstick_priv'
drivers/memstick/core/memstick.o:memstick.c:(.text+0x0): first defined here
drivers/memstick/core/mspro_block.o: In function `memstick_get_drvdata':
mspro_block.c:(.text+0x6): multiple definition of `memstick_get_drvdata'
drivers/memstick/core/memstick.o:memstick.c:(.text+0x6): first defined here
drivers/memstick/core/mspro_block.o: In function `memstick_set_drvdata':
mspro_block.c:(.text+0xd): multiple definition of `memstick_set_drvdata'
drivers/memstick/core/memstick.o:memstick.c:(.text+0xd): first defined here 

This is because those three functions are not defined as static in "include/linux/memstick.h".

Signed-off-by: Miguel Botón <mboton@gmail.com>

diff --git a/include/linux/memstick.h b/include/linux/memstick.h
index dc5ac9d..53a8741 100644
--- a/include/linux/memstick.h
+++ b/include/linux/memstick.h
@@ -271,17 +271,17 @@ void memstick_new_req(struct memstick_host *host);
 
 int memstick_set_rw_addr(struct memstick_dev *card);
 
-inline void *memstick_priv(struct memstick_host *host)
+static inline void *memstick_priv(struct memstick_host *host)
 {
 	return (void *)host->private;
 }
 
-inline void *memstick_get_drvdata(struct memstick_dev *card)
+static inline void *memstick_get_drvdata(struct memstick_dev *card)
 {
 	return dev_get_drvdata(&card->dev);
 }
 
-inline void memstick_set_drvdata(struct memstick_dev *card, void *data)
+static inline void memstick_set_drvdata(struct memstick_dev *card, void *data)
 {
 	dev_set_drvdata(&card->dev, data);
 }

---
	Miguel Botón

             reply	other threads:[~2008-01-13 22:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-13 22:47 Miguel Botón [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-01-02  6:42 oakad
2008-01-10  9:00 ` Andrew Morton
2008-01-11 12:14   ` Jens Axboe
2008-01-14  3:26   ` Alex Dubov
2008-01-22 16:12   ` Alex Dubov
2008-01-22 18:59     ` Andrew Morton
2008-01-15 17:21 ` Mariusz Kozlowski
2008-01-16  1:52   ` Alex Dubov
2007-12-24  3:06 oakad
2007-12-31  0:01 ` Carlos Corbacho
2007-12-31  0:31   ` Jan Engelhardt
2007-12-31  0:54     ` Alex Dubov
2007-12-31  0:56     ` Carlos Corbacho
2007-12-31  1:01   ` Alex Dubov
2007-12-31  1:15     ` Carlos Corbacho
2007-12-31  4:51       ` Alex Dubov

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=478A94FC.1050607@gmail.com \
    --to=mboton@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oakad@exemail.com.au \
    --cc=oakad@yahoo.com \
    --subject='Re: [PATCH] [MEMSTICK] Initial commit for Sony MemoryStick support' \
    /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

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