git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
[sfrench/cifs-2.6.git]
/
sound
/
ppc
/
keywest.c
diff --git
a/sound/ppc/keywest.c
b/sound/ppc/keywest.c
index 59482a4cd44641ecd8d9ab253c128c93ae1dd3a3..6ff99ed77516e3c6f8dcaf9bbf4c4a9888a4ae36 100644
(file)
--- a/
sound/ppc/keywest.c
+++ b/
sound/ppc/keywest.c
@@
-19,7
+19,6
@@
*/
*/
-#include <sound/driver.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/delay.h>
@@
-34,8
+33,6
@@
static struct pmac_keywest *keywest_ctx;
static struct pmac_keywest *keywest_ctx;
-#define I2C_DRIVERID_KEYWEST 0xFEBA
-
static int keywest_attach_adapter(struct i2c_adapter *adapter);
static int keywest_detach_client(struct i2c_client *client);
static int keywest_attach_adapter(struct i2c_adapter *adapter);
static int keywest_detach_client(struct i2c_client *client);
@@
-43,7
+40,6
@@
struct i2c_driver keywest_driver = {
.driver = {
.name = "PMac Keywest Audio",
},
.driver = {
.name = "PMac Keywest Audio",
},
- .id = I2C_DRIVERID_KEYWEST,
.attach_adapter = &keywest_attach_adapter,
.detach_client = &keywest_detach_client,
};
.attach_adapter = &keywest_attach_adapter,
.detach_client = &keywest_detach_client,
};
@@
-117,6
+113,9
@@
int __init snd_pmac_tumbler_post_init(void)
{
int err;
{
int err;
+ if (!keywest_ctx || !keywest_ctx->client)
+ return -ENXIO;
+
if ((err = keywest_ctx->init_client(keywest_ctx)) < 0) {
snd_printk(KERN_ERR "tumbler: %i :cannot initialize the MCS\n", err);
return err;
if ((err = keywest_ctx->init_client(keywest_ctx)) < 0) {
snd_printk(KERN_ERR "tumbler: %i :cannot initialize the MCS\n", err);
return err;