forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'asoc-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git…
…/broonie/sound into for-linus ASoC: Fixes for v3.7 Nothing too exciting except for the ams-delta change which is relatively lerge due to the fact that the driver loading had been totally broken as the driver needed a newer API to function.
- Loading branch information
Showing
12 changed files
with
90 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -575,56 +575,53 @@ static struct snd_soc_card ams_delta_audio_card = { | |
}; | ||
|
||
/* Module init/exit */ | ||
static struct platform_device *ams_delta_audio_platform_device; | ||
static struct platform_device *cx20442_platform_device; | ||
|
||
static int __init ams_delta_module_init(void) | ||
static __devinit int ams_delta_probe(struct platform_device *pdev) | ||
{ | ||
struct snd_soc_card *card = &ams_delta_audio_card; | ||
int ret; | ||
|
||
if (!(machine_is_ams_delta())) | ||
return -ENODEV; | ||
|
||
ams_delta_audio_platform_device = | ||
platform_device_alloc("soc-audio", -1); | ||
if (!ams_delta_audio_platform_device) | ||
return -ENOMEM; | ||
card->dev = &pdev->dev; | ||
|
||
platform_set_drvdata(ams_delta_audio_platform_device, | ||
&ams_delta_audio_card); | ||
|
||
ret = platform_device_add(ams_delta_audio_platform_device); | ||
if (ret) | ||
goto err; | ||
|
||
/* | ||
* Codec platform device could be registered from elsewhere (board?), | ||
* but I do it here as it makes sense only if used with the card. | ||
*/ | ||
cx20442_platform_device = | ||
platform_device_register_simple("cx20442-codec", -1, NULL, 0); | ||
ret = snd_soc_register_card(card); | ||
if (ret) { | ||
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); | ||
card->dev = NULL; | ||
return ret; | ||
} | ||
return 0; | ||
err: | ||
platform_device_put(ams_delta_audio_platform_device); | ||
return ret; | ||
} | ||
late_initcall(ams_delta_module_init); | ||
|
||
static void __exit ams_delta_module_exit(void) | ||
static int __devexit ams_delta_remove(struct platform_device *pdev) | ||
{ | ||
struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
|
||
if (tty_unregister_ldisc(N_V253) != 0) | ||
dev_warn(&ams_delta_audio_platform_device->dev, | ||
dev_warn(&pdev->dev, | ||
"failed to unregister V253 line discipline\n"); | ||
|
||
snd_soc_jack_free_gpios(&ams_delta_hook_switch, | ||
ARRAY_SIZE(ams_delta_hook_switch_gpios), | ||
ams_delta_hook_switch_gpios); | ||
|
||
platform_device_unregister(cx20442_platform_device); | ||
platform_device_unregister(ams_delta_audio_platform_device); | ||
snd_soc_unregister_card(card); | ||
card->dev = NULL; | ||
return 0; | ||
} | ||
module_exit(ams_delta_module_exit); | ||
|
||
#define DRV_NAME "ams-delta-audio" | ||
|
||
static struct platform_driver ams_delta_driver = { | ||
.driver = { | ||
.name = DRV_NAME, | ||
.owner = THIS_MODULE, | ||
}, | ||
.probe = ams_delta_probe, | ||
.remove = __devexit_p(ams_delta_remove), | ||
}; | ||
|
||
module_platform_driver(ams_delta_driver); | ||
|
||
MODULE_AUTHOR("Janusz Krzysztofik <[email protected]>"); | ||
MODULE_DESCRIPTION("ALSA SoC driver for Amstrad E3 (Delta) videophone"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_ALIAS("platform:" DRV_NAME); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters