git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
sound
/
isa
/
sb
/
sb_common.c
diff --git
a/sound/isa/sb/sb_common.c
b/sound/isa/sb/sb_common.c
index
5b6bde2
..
f343a82
100644
(file)
--- a/
sound/isa/sb/sb_common.c
+++ b/
sound/isa/sb/sb_common.c
@@
-41,11
+41,11
@@
MODULE_LICENSE("GPL");
#undef IO_DEBUG
#undef IO_DEBUG
-int snd_sbdsp_command(s
b_t
*chip, unsigned char val)
+int snd_sbdsp_command(s
truct snd_sb
*chip, unsigned char val)
{
int i;
#ifdef IO_DEBUG
{
int i;
#ifdef IO_DEBUG
- snd_printk("command 0x%x\n", val);
+ snd_printk(
KERN_DEBUG
"command 0x%x\n", val);
#endif
for (i = BUSY_LOOPS; i; i--)
if ((inb(SBP(chip, STATUS)) & 0x80) == 0) {
#endif
for (i = BUSY_LOOPS; i; i--)
if ((inb(SBP(chip, STATUS)) & 0x80) == 0) {
@@
-56,7
+56,7
@@
int snd_sbdsp_command(sb_t *chip, unsigned char val)
return 0;
}
return 0;
}
-int snd_sbdsp_get_byte(s
b_t
*chip)
+int snd_sbdsp_get_byte(s
truct snd_sb
*chip)
{
int val;
int i;
{
int val;
int i;
@@
-64,7
+64,7
@@
int snd_sbdsp_get_byte(sb_t *chip)
if (inb(SBP(chip, DATA_AVAIL)) & 0x80) {
val = inb(SBP(chip, READ));
#ifdef IO_DEBUG
if (inb(SBP(chip, DATA_AVAIL)) & 0x80) {
val = inb(SBP(chip, READ));
#ifdef IO_DEBUG
- snd_printk("get_byte 0x%x\n", val);
+ snd_printk(
KERN_DEBUG
"get_byte 0x%x\n", val);
#endif
return val;
}
#endif
return val;
}
@@
-73,7
+73,7
@@
int snd_sbdsp_get_byte(sb_t *chip)
return -ENODEV;
}
return -ENODEV;
}
-int snd_sbdsp_reset(s
b_t
*chip)
+int snd_sbdsp_reset(s
truct snd_sb
*chip)
{
int i;
{
int i;
@@
-92,7
+92,7
@@
int snd_sbdsp_reset(sb_t *chip)
return -ENODEV;
}
return -ENODEV;
}
-static int snd_sbdsp_version(s
b_t
* chip)
+static int snd_sbdsp_version(s
truct snd_sb
* chip)
{
unsigned int result = -ENODEV;
{
unsigned int result = -ENODEV;
@@
-102,7
+102,7
@@
static int snd_sbdsp_version(sb_t * chip)
return result;
}
return result;
}
-static int snd_sbdsp_probe(s
b_t
* chip)
+static int snd_sbdsp_probe(s
truct snd_sb
* chip)
{
int version;
int major, minor;
{
int version;
int major, minor;
@@
-154,7
+154,7
@@
static int snd_sbdsp_probe(sb_t * chip)
str = "16";
break;
default:
str = "16";
break;
default:
- snd_printk("SB [0x%lx]: unknown DSP chip version %i.%i\n",
+ snd_printk(
KERN_INFO
"SB [0x%lx]: unknown DSP chip version %i.%i\n",
chip->port, major, minor);
return -ENODEV;
}
chip->port, major, minor);
return -ENODEV;
}
@@
-176,12
+176,10
@@
static int snd_sbdsp_probe(sb_t * chip)
return 0;
}
return 0;
}
-static int snd_sbdsp_free(s
b_t
*chip)
+static int snd_sbdsp_free(s
truct snd_sb
*chip)
{
{
- if (chip->res_port) {
- release_resource(chip->res_port);
- kfree_nocheck(chip->res_port);
- }
+ if (chip->res_port)
+ release_and_free_resource(chip->res_port);
if (chip->irq >= 0)
free_irq(chip->irq, (void *) chip);
#ifdef CONFIG_ISA
if (chip->irq >= 0)
free_irq(chip->irq, (void *) chip);
#ifdef CONFIG_ISA
@@
-198,30
+196,30
@@
static int snd_sbdsp_free(sb_t *chip)
return 0;
}
return 0;
}
-static int snd_sbdsp_dev_free(s
nd_device_t
*device)
+static int snd_sbdsp_dev_free(s
truct snd_device
*device)
{
{
- s
b_t
*chip = device->device_data;
+ s
truct snd_sb
*chip = device->device_data;
return snd_sbdsp_free(chip);
}
return snd_sbdsp_free(chip);
}
-int snd_sbdsp_create(s
nd_card_t
*card,
+int snd_sbdsp_create(s
truct snd_card
*card,
unsigned long port,
int irq,
irqreturn_t (*irq_handler)(int, void *, struct pt_regs *),
int dma8,
int dma16,
unsigned short hardware,
unsigned long port,
int irq,
irqreturn_t (*irq_handler)(int, void *, struct pt_regs *),
int dma8,
int dma16,
unsigned short hardware,
- s
b_t
**r_chip)
+ s
truct snd_sb
**r_chip)
{
{
- s
b_t
*chip;
+ s
truct snd_sb
*chip;
int err;
int err;
- static s
nd_device_ops_t
ops = {
+ static s
truct snd_device_ops
ops = {
.dev_free = snd_sbdsp_dev_free,
};
snd_assert(r_chip != NULL, return -EINVAL);
*r_chip = NULL;
.dev_free = snd_sbdsp_dev_free,
};
snd_assert(r_chip != NULL, return -EINVAL);
*r_chip = NULL;
- chip = k
calloc(1,
sizeof(*chip), GFP_KERNEL);
+ chip = k
zalloc(
sizeof(*chip), GFP_KERNEL);
if (chip == NULL)
return -ENOMEM;
spin_lock_init(&chip->reg_lock);
if (chip == NULL)
return -ENOMEM;
spin_lock_init(&chip->reg_lock);
@@
-295,6
+293,10
@@
EXPORT_SYMBOL(snd_sbmixer_write);
EXPORT_SYMBOL(snd_sbmixer_read);
EXPORT_SYMBOL(snd_sbmixer_new);
EXPORT_SYMBOL(snd_sbmixer_add_ctl);
EXPORT_SYMBOL(snd_sbmixer_read);
EXPORT_SYMBOL(snd_sbmixer_new);
EXPORT_SYMBOL(snd_sbmixer_add_ctl);
+#ifdef CONFIG_PM
+EXPORT_SYMBOL(snd_sbmixer_suspend);
+EXPORT_SYMBOL(snd_sbmixer_resume);
+#endif
/*
* INIT part
/*
* INIT part