lkml.org 
[lkml]   [2005]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[-mm patch] fix SuperIO compilation
On Mon, Jan 24, 2005 at 02:15:16AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.11-rc1-mm2:
>...
> bk-i2c.patch
>...
> Latest versions of various bk trees
>...

This causes the following compile error:

<-- snip -->

...
LD drivers/superio/built-in.o
drivers/superio/sc_acb.o(.text+0x0): In function `sc_write_reg':
: multiple definition of `sc_write_reg'
drivers/superio/sc_gpio.o(.text+0x0): first defined here
drivers/superio/sc_acb.o(.text+0x30): In function `sc_read_reg':
: multiple definition of `sc_read_reg'
drivers/superio/sc_gpio.o(.text+0x30): first defined here
make[2]: *** [drivers/superio/built-in.o] Error 1

<-- snip -->

The trivial fix for these needlessly global functions is below.

BTW1: pin_test.c is added but completely unused.
BTW2: bk-i2c adds a whole bunch of unused SuperIO EXPORT_SYMBOL's.
Is usage for them expected very soon or shall I send a patch to
remove them?


<-- snip -->


This patch makes needlessly global functions static fixing a compile
error if both sc_acb.c and sc_gpio.c are compiled statically into the
kernel.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
drivers/superio/sc_acb.c | 4 ++--
drivers/superio/sc_gpio.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
--- linux-2.6.11-rc2-mm1-full/drivers/superio/sc_acb.c.old 2005-01-24 12:28:22.000000000 +0100
+++ linux-2.6.11-rc2-mm1-full/drivers/superio/sc_acb.c 2005-01-24 12:29:23.000000000 +0100
@@ -48,13 +48,13 @@
.orig_ldev = NULL,
};

-void sc_write_reg(struct sc_dev *dev, u8 reg, u8 val)
+static void sc_write_reg(struct sc_dev *dev, u8 reg, u8 val)
{
outb(reg, dev->base_index);
outb(val, dev->base_data);
}

-u8 sc_read_reg(struct sc_dev *dev, u8 reg)
+static u8 sc_read_reg(struct sc_dev *dev, u8 reg)
{
u8 val;

--- linux-2.6.11-rc2-mm1-full/drivers/superio/sc_gpio.c.old 2005-01-24 12:29:48.000000000 +0100
+++ linux-2.6.11-rc2-mm1-full/drivers/superio/sc_gpio.c 2005-01-24 12:29:58.000000000 +0100
@@ -50,13 +50,13 @@

static void sc_gpio_write_event(void *data, int pin_number, u8 byte);

-void sc_write_reg(struct sc_dev *dev, u8 reg, u8 val)
+static void sc_write_reg(struct sc_dev *dev, u8 reg, u8 val)
{
outb(reg, dev->base_index);
outb(val, dev->base_data);
}

-u8 sc_read_reg(struct sc_dev *dev, u8 reg)
+static u8 sc_read_reg(struct sc_dev *dev, u8 reg)
{
u8 val;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [from the cache]
©2003-2011 Jasper Spaans