Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24063
b: refs/heads/master
c: 8f3b50f
h: refs/heads/master
i:
  24061: 77f8f9f
  24059: cc80be1
  24055: 27afad8
  24047: 9f6b4ad
  24031: 5049efa
  23999: dceb140
  23935: 219debd
  23807: 133761b
  23551: b06c5ba
v: v3
  • Loading branch information
Eric Sesterhenn authored and Linus Torvalds committed Mar 26, 2006
1 parent 288c4b6 commit d2bd304
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1751ace034bba6b423c1de4668f0e65cc9ef2b84
refs/heads/master: 8f3b50fc72d538c79dd2c1f728f5e594a0192da2
40 changes: 19 additions & 21 deletions trunk/sound/oss/vwsnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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
*/
Expand Down

0 comments on commit d2bd304

Please sign in to comment.