keywest.c (da733563be5a9da26fe81d9f007262d00b846e22) | keywest.c (15afafc2565bc785eb7a440b8b4a53f77910cf04) |
---|---|
1/* 2 * common keywest i2c layer 3 * 4 * Copyright (c) by Takashi Iwai <tiwai@suse.de> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 101 unchanged lines hidden (view full) --- 110void snd_pmac_keywest_cleanup(struct pmac_keywest *i2c) 111{ 112 if (keywest_ctx && keywest_ctx == i2c) { 113 i2c_del_driver(&keywest_driver); 114 keywest_ctx = NULL; 115 } 116} 117 | 1/* 2 * common keywest i2c layer 3 * 4 * Copyright (c) by Takashi Iwai <tiwai@suse.de> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 101 unchanged lines hidden (view full) --- 110void snd_pmac_keywest_cleanup(struct pmac_keywest *i2c) 111{ 112 if (keywest_ctx && keywest_ctx == i2c) { 113 i2c_del_driver(&keywest_driver); 114 keywest_ctx = NULL; 115 } 116} 117 |
118int __devinit snd_pmac_tumbler_post_init(void) | 118int snd_pmac_tumbler_post_init(void) |
119{ 120 int err; 121 122 if (!keywest_ctx || !keywest_ctx->client) 123 return -ENXIO; 124 125 if ((err = keywest_ctx->init_client(keywest_ctx)) < 0) { 126 snd_printk(KERN_ERR "tumbler: %i :cannot initialize the MCS\n", err); 127 return err; 128 } 129 return 0; 130} 131 132/* exported */ | 119{ 120 int err; 121 122 if (!keywest_ctx || !keywest_ctx->client) 123 return -ENXIO; 124 125 if ((err = keywest_ctx->init_client(keywest_ctx)) < 0) { 126 snd_printk(KERN_ERR "tumbler: %i :cannot initialize the MCS\n", err); 127 return err; 128 } 129 return 0; 130} 131 132/* exported */ |
133int __devinit snd_pmac_keywest_init(struct pmac_keywest *i2c) | 133int snd_pmac_keywest_init(struct pmac_keywest *i2c) |
134{ 135 int err; 136 137 if (keywest_ctx) 138 return -EBUSY; 139 140 keywest_ctx = i2c; 141 142 if ((err = i2c_add_driver(&keywest_driver))) { 143 snd_printk(KERN_ERR "cannot register keywest i2c driver\n"); 144 return err; 145 } 146 return 0; 147} | 134{ 135 int err; 136 137 if (keywest_ctx) 138 return -EBUSY; 139 140 keywest_ctx = i2c; 141 142 if ((err = i2c_add_driver(&keywest_driver))) { 143 snd_printk(KERN_ERR "cannot register keywest i2c driver\n"); 144 return err; 145 } 146 return 0; 147} |