Commit 8f3b50fc authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Linus Torvalds

[PATCH] Fix compilation for sound/oss/vwsnd.c

Fix compilation for sound/oss/vwsnd.o, by moving li_destroy() above
li_create()

sound/oss/vwsnd.c:275: warning: conflicting types for ‘li_destroy’
sound/oss/vwsnd.c:275: error: static declaration of ‘li_destroy’ follows non-static declaration
sound/oss/vwsnd.c:264: error: previous implicit declaration of ‘li_destroy’ was here
Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1751ace0
...@@ -247,27 +247,6 @@ typedef struct lithium { ...@@ -247,27 +247,6 @@ typedef struct lithium {
spinlock_t lock; /* protects codec and UST/MSC access */ spinlock_t lock; /* protects codec and UST/MSC access */
} lithium_t; } lithium_t;
/*
* li_create initializes the lithium_t structure and sets up vm mappings
* to access the registers.
* Returns 0 on success, -errno on failure.
*/
static int __init li_create(lithium_t *lith, unsigned long baseaddr)
{
static void li_destroy(lithium_t *);
spin_lock_init(&lith->lock);
lith->page0 = ioremap_nocache(baseaddr + LI_PAGE0_OFFSET, PAGE_SIZE);
lith->page1 = ioremap_nocache(baseaddr + LI_PAGE1_OFFSET, PAGE_SIZE);
lith->page2 = ioremap_nocache(baseaddr + LI_PAGE2_OFFSET, PAGE_SIZE);
if (!lith->page0 || !lith->page1 || !lith->page2) {
li_destroy(lith);
return -ENOMEM;
}
return 0;
}
/* /*
* li_destroy destroys the lithium_t structure and vm mappings. * li_destroy destroys the lithium_t structure and vm mappings.
*/ */
...@@ -288,6 +267,25 @@ static void li_destroy(lithium_t *lith) ...@@ -288,6 +267,25 @@ static void li_destroy(lithium_t *lith)
} }
} }
/*
* li_create initializes the lithium_t structure and sets up vm mappings
* to access the registers.
* Returns 0 on success, -errno on failure.
*/
static int __init li_create(lithium_t *lith, unsigned long baseaddr)
{
spin_lock_init(&lith->lock);
lith->page0 = ioremap_nocache(baseaddr + LI_PAGE0_OFFSET, PAGE_SIZE);
lith->page1 = ioremap_nocache(baseaddr + LI_PAGE1_OFFSET, PAGE_SIZE);
lith->page2 = ioremap_nocache(baseaddr + LI_PAGE2_OFFSET, PAGE_SIZE);
if (!lith->page0 || !lith->page1 || !lith->page2) {
li_destroy(lith);
return -ENOMEM;
}
return 0;
}
/* /*
* basic register accessors - read/write long/byte * basic register accessors - read/write long/byte
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment