Merge branch 'merge'

This commit is contained in:
Paul Mackerras
2006-08-08 17:09:11 +10:00
當前提交 32bc6e095d
共有 298 個文件被更改,包括 3243 次插入2010 次删除

查看文件

@@ -51,6 +51,13 @@ static struct transfer_info toonie_transfers[] = {
{}
};
static int toonie_usable(struct codec_info_item *cii,
struct transfer_info *ti,
struct transfer_info *out)
{
return 1;
}
#ifdef CONFIG_PM
static int toonie_suspend(struct codec_info_item *cii, pm_message_t state)
{
@@ -69,6 +76,7 @@ static struct codec_info toonie_codec_info = {
.sysclock_factor = 256,
.bus_factor = 64,
.owner = THIS_MODULE,
.usable = toonie_usable,
#ifdef CONFIG_PM
.suspend = toonie_suspend,
.resume = toonie_resume,
@@ -79,19 +87,20 @@ static int toonie_init_codec(struct aoa_codec *codec)
{
struct toonie *toonie = codec_to_toonie(codec);
/* nothing connected? what a joke! */
if (toonie->codec.connected != 1)
return -ENOTCONN;
if (aoa_snd_device_new(SNDRV_DEV_LOWLEVEL, toonie, &ops)) {
printk(KERN_ERR PFX "failed to create toonie snd device!\n");
return -ENODEV;
}
/* nothing connected? what a joke! */
if (toonie->codec.connected != 1)
return -ENOTCONN;
if (toonie->codec.soundbus_dev->attach_codec(toonie->codec.soundbus_dev,
aoa_get_card(),
&toonie_codec_info, toonie)) {
printk(KERN_ERR PFX "error creating toonie pcm\n");
snd_device_free(aoa_get_card(), toonie);
return -ENODEV;
}

查看文件

@@ -112,7 +112,10 @@ static struct device_node *get_gpio(char *name,
static void get_irq(struct device_node * np, int *irqptr)
{
*irqptr = irq_of_parse_and_map(np, 0);
if (np)
*irqptr = irq_of_parse_and_map(np, 0);
else
*irqptr = NO_IRQ;
}
/* 0x4 is outenable, 0x1 is out, thus 4 or 5 */
@@ -322,7 +325,7 @@ static int ftr_set_notify(struct gpio_runtime *rt,
return -EINVAL;
}
if (irq == -1)
if (irq == NO_IRQ)
return -ENODEV;
mutex_lock(&notif->mutex);

查看文件

@@ -18,7 +18,7 @@ static void pmf_gpio_set_##name(struct gpio_runtime *rt, int on)\
\
if (unlikely(!rt)) return; \
rc = pmf_call_function(rt->node, #name "-mute", &args); \
if (rc) \
if (rc && rc != -ENODEV) \
printk(KERN_WARNING "pmf_gpio_set_" #name \
" failed, rc: %d\n", rc); \
rt->implementation_private &= ~(1<<bit); \