diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-05-27 15:01:35 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-05-27 15:01:35 +0000 |
commit | 20ba6d90e31707ee95630804a284c8bad8cc90ed (patch) | |
tree | 627023b35ae52680fd32b5b3f38326f5fd837bcb /target/linux/xburst/patches-3.2/0018-ASoC-jz4740-Convert-qi_lb60-to-use-snd_soc_register_.patch | |
parent | d043cb2c349a8c1d8f344913547175895c988699 (diff) | |
download | master-31e0f0ae-20ba6d90e31707ee95630804a284c8bad8cc90ed.tar.gz master-31e0f0ae-20ba6d90e31707ee95630804a284c8bad8cc90ed.tar.bz2 master-31e0f0ae-20ba6d90e31707ee95630804a284c8bad8cc90ed.zip |
xburst: remove support for old kernels
SVN-Revision: 31904
Diffstat (limited to 'target/linux/xburst/patches-3.2/0018-ASoC-jz4740-Convert-qi_lb60-to-use-snd_soc_register_.patch')
-rw-r--r-- | target/linux/xburst/patches-3.2/0018-ASoC-jz4740-Convert-qi_lb60-to-use-snd_soc_register_.patch | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/target/linux/xburst/patches-3.2/0018-ASoC-jz4740-Convert-qi_lb60-to-use-snd_soc_register_.patch b/target/linux/xburst/patches-3.2/0018-ASoC-jz4740-Convert-qi_lb60-to-use-snd_soc_register_.patch deleted file mode 100644 index 52962ad836..0000000000 --- a/target/linux/xburst/patches-3.2/0018-ASoC-jz4740-Convert-qi_lb60-to-use-snd_soc_register_.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 94f2b91d2a42854a8869d54a758bc88757d7f6d9 Mon Sep 17 00:00:00 2001 -From: Axel Lin <axel.lin@gmail.com> -Date: Fri, 6 Jan 2012 11:30:10 +0800 -Subject: [PATCH 18/21] ASoC: jz4740: Convert qi_lb60 to use - snd_soc_register_card() - -Use snd_soc_register_card() instead of creating a "soc-audio" platform device. - -Signed-off-by: Axel Lin <axel.lin@gmail.com> ---- - arch/mips/jz4740/board-qi_lb60.c | 6 ++++ - sound/soc/jz4740/qi_lb60.c | 56 +++++++++++++++++-------------------- - 2 files changed, 32 insertions(+), 30 deletions(-) - ---- a/arch/mips/jz4740/board-qi_lb60.c -+++ b/arch/mips/jz4740/board-qi_lb60.c -@@ -418,6 +418,11 @@ static struct platform_device qi_lb60_ch - }, - }; - -+/* audio */ -+static struct platform_device qi_lb60_audio_device = { -+ .name = "qi-lb60-audio", -+ .id = -1, -+}; - - static struct platform_device *jz_platform_devices[] __initdata = { - &jz4740_udc_device, -@@ -434,6 +439,7 @@ static struct platform_device *jz_platfo - &qi_lb60_gpio_keys, - &qi_lb60_pwm_beeper, - &qi_lb60_charger_device, -+ &qi_lb60_audio_device, - }; - - static void __init board_gpio_setup(void) ---- a/sound/soc/jz4740/qi_lb60.c -+++ b/sound/soc/jz4740/qi_lb60.c -@@ -90,56 +90,52 @@ static struct snd_soc_card qi_lb60 = { - .num_dapm_routes = ARRAY_SIZE(qi_lb60_routes), - }; - --static struct platform_device *qi_lb60_snd_device; -- - static const struct gpio qi_lb60_gpios[] = { - { QI_LB60_SND_GPIO, GPIOF_OUT_INIT_LOW, "SND" }, - { QI_LB60_AMP_GPIO, GPIOF_OUT_INIT_LOW, "AMP" }, - }; - --static int __init qi_lb60_init(void) -+static int __devinit qi_lb60_probe(struct platform_device *pdev) - { -+ struct snd_soc_card *card = &qi_lb60; - int ret; - -- qi_lb60_snd_device = platform_device_alloc("soc-audio", -1); -- -- if (!qi_lb60_snd_device) -- return -ENOMEM; -- - ret = gpio_request_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios)); -- if (ret) { -- pr_err("qi_lb60 snd: Failed to request gpios: %d\n", ret); -- goto err_device_put; -- } -+ if (ret) -+ return ret; - -- platform_set_drvdata(qi_lb60_snd_device, &qi_lb60); -+ card->dev = &pdev->dev; - -- ret = platform_device_add(qi_lb60_snd_device); -+ ret = snd_soc_register_card(card); - if (ret) { -- pr_err("qi_lb60 snd: Failed to add snd soc device: %d\n", ret); -- goto err_unset_pdata; -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ ret); -+ gpio_free_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios)); - } -- -- return 0; -- --err_unset_pdata: -- platform_set_drvdata(qi_lb60_snd_device, NULL); --/*err_gpio_free_array:*/ -- gpio_free_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios)); --err_device_put: -- platform_device_put(qi_lb60_snd_device); -- - return ret; - } --module_init(qi_lb60_init); - --static void __exit qi_lb60_exit(void) -+static int __devexit qi_lb60_remove(struct platform_device *pdev) - { -- platform_device_unregister(qi_lb60_snd_device); -+ struct snd_soc_card *card = platform_get_drvdata(pdev); -+ -+ snd_soc_unregister_card(card); - gpio_free_array(qi_lb60_gpios, ARRAY_SIZE(qi_lb60_gpios)); -+ return 0; - } --module_exit(qi_lb60_exit); -+ -+static struct platform_driver qi_lb60_driver = { -+ .driver = { -+ .name = "qi-lb60-audio", -+ .owner = THIS_MODULE, -+ }, -+ .probe = qi_lb60_probe, -+ .remove = __devexit_p(qi_lb60_remove), -+}; -+ -+module_platform_driver(qi_lb60_driver); - - MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); - MODULE_DESCRIPTION("ALSA SoC QI LB60 Audio support"); - MODULE_LICENSE("GPL v2"); -+MODULE_ALIAS("platform:qi-lb60-audio"); |