From d2bd304b1fdb20518dfbc02f1c70f5f68e3dbd52 Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Sun, 26 Mar 2006 01:37:37 -0800 Subject: [PATCH] --- yaml --- r: 24063 b: refs/heads/master c: 8f3b50fc72d538c79dd2c1f728f5e594a0192da2 h: refs/heads/master i: 24061: 77f8f9f622229f5bbdc15c22aa534d380de29997 24059: cc80be1d372f098c3fcb0924d1603dff09d28910 24055: 27afad8d3983b03b3eed8b0e8f03b63cf547af62 24047: 9f6b4ad1bd0af49119aac555186d24abb235d158 24031: 5049efabc2e0ae7f02cc5493ffecc0244bb652b1 23999: dceb140caeb3c8e9aa4dfba92bc05e8ddf53cbaa 23935: 219debd83b2ded8c4f3d158484c28c88ab093705 23807: 133761bfd801d126ea8929bfe1ac220d6d32faab 23551: b06c5bab229e268a77341e9c392c10394ce5f177 v: v3 --- [refs] | 2 +- trunk/sound/oss/vwsnd.c | 40 +++++++++++++++++++--------------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/[refs] b/[refs] index 1e964faa8c29..a75bd32f0823 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1751ace034bba6b423c1de4668f0e65cc9ef2b84 +refs/heads/master: 8f3b50fc72d538c79dd2c1f728f5e594a0192da2 diff --git a/trunk/sound/oss/vwsnd.c b/trunk/sound/oss/vwsnd.c index b372e88e857f..5f140c7586b3 100644 --- a/trunk/sound/oss/vwsnd.c +++ b/trunk/sound/oss/vwsnd.c @@ -247,27 +247,6 @@ typedef struct lithium { spinlock_t lock; /* protects codec and UST/MSC access */ } 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. */ @@ -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 */