diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-10 08:05:45 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-10 08:05:45 -0400 |
commit | 3ce9bcb583536c45a46c7302747029450e22279c (patch) | |
tree | 7a4167189ffc6dc909151d1a5d040f9f0656a9f4 /sound/soc | |
parent | 26fd10517e810dd59ea050b052de24a75ee6dc07 (diff) | |
parent | f7d0b926ac8c8ec0c7a83ee69409bd2e6bb39f81 (diff) |
Merge branch 'core/xen' into x86/xen
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/ak4535.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/uda1380.c | 9 | ||||
-rw-r--r-- | sound/soc/codecs/wm8510.c | 9 | ||||
-rw-r--r-- | sound/soc/codecs/wm8731.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/wm8750.c | 10 | ||||
-rw-r--r-- | sound/soc/codecs/wm8753.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/wm8990.c | 11 | ||||
-rw-r--r-- | sound/soc/omap/n810.c | 18 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-i2s.c | 40 |
10 files changed, 103 insertions, 38 deletions
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c index b26003c4f3e8..7da9f467b7b8 100644 --- a/sound/soc/codecs/ak4535.c +++ b/sound/soc/codecs/ak4535.c | |||
@@ -562,10 +562,9 @@ static int ak4535_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
562 | client_template.addr = addr; | 562 | client_template.addr = addr; |
563 | 563 | ||
564 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 564 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
565 | if (i2c == NULL) { | 565 | if (i2c == NULL) |
566 | kfree(codec); | ||
567 | return -ENOMEM; | 566 | return -ENOMEM; |
568 | } | 567 | |
569 | i2c_set_clientdata(i2c, codec); | 568 | i2c_set_clientdata(i2c, codec); |
570 | codec->control_data = i2c; | 569 | codec->control_data = i2c; |
571 | 570 | ||
@@ -583,7 +582,6 @@ static int ak4535_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
583 | return ret; | 582 | return ret; |
584 | 583 | ||
585 | err: | 584 | err: |
586 | kfree(codec); | ||
587 | kfree(i2c); | 585 | kfree(i2c); |
588 | return ret; | 586 | return ret; |
589 | } | 587 | } |
@@ -660,6 +658,11 @@ static int ak4535_probe(struct platform_device *pdev) | |||
660 | #else | 658 | #else |
661 | /* Add other interfaces here */ | 659 | /* Add other interfaces here */ |
662 | #endif | 660 | #endif |
661 | |||
662 | if (ret != 0) { | ||
663 | kfree(codec->private_data); | ||
664 | kfree(codec); | ||
665 | } | ||
663 | return ret; | 666 | return ret; |
664 | } | 667 | } |
665 | 668 | ||
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index b1dce5f459db..5f9abb199435 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -1199,10 +1199,9 @@ static int aic3x_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
1199 | client_template.addr = addr; | 1199 | client_template.addr = addr; |
1200 | 1200 | ||
1201 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 1201 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
1202 | if (i2c == NULL) { | 1202 | if (i2c == NULL) |
1203 | kfree(codec); | ||
1204 | return -ENOMEM; | 1203 | return -ENOMEM; |
1205 | } | 1204 | |
1206 | i2c_set_clientdata(i2c, codec); | 1205 | i2c_set_clientdata(i2c, codec); |
1207 | codec->control_data = i2c; | 1206 | codec->control_data = i2c; |
1208 | 1207 | ||
@@ -1221,7 +1220,6 @@ static int aic3x_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
1221 | return ret; | 1220 | return ret; |
1222 | 1221 | ||
1223 | err: | 1222 | err: |
1224 | kfree(codec); | ||
1225 | kfree(i2c); | 1223 | kfree(i2c); |
1226 | return ret; | 1224 | return ret; |
1227 | } | 1225 | } |
@@ -1302,6 +1300,11 @@ static int aic3x_probe(struct platform_device *pdev) | |||
1302 | #else | 1300 | #else |
1303 | /* Add other interfaces here */ | 1301 | /* Add other interfaces here */ |
1304 | #endif | 1302 | #endif |
1303 | |||
1304 | if (ret != 0) { | ||
1305 | kfree(codec->private_data); | ||
1306 | kfree(codec); | ||
1307 | } | ||
1305 | return ret; | 1308 | return ret; |
1306 | } | 1309 | } |
1307 | 1310 | ||
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index a52d6d9e007a..807318fbdc8f 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c | |||
@@ -729,10 +729,9 @@ static int uda1380_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
729 | client_template.addr = addr; | 729 | client_template.addr = addr; |
730 | 730 | ||
731 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 731 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
732 | if (i2c == NULL) { | 732 | if (i2c == NULL) |
733 | kfree(codec); | ||
734 | return -ENOMEM; | 733 | return -ENOMEM; |
735 | } | 734 | |
736 | i2c_set_clientdata(i2c, codec); | 735 | i2c_set_clientdata(i2c, codec); |
737 | codec->control_data = i2c; | 736 | codec->control_data = i2c; |
738 | 737 | ||
@@ -750,7 +749,6 @@ static int uda1380_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
750 | return ret; | 749 | return ret; |
751 | 750 | ||
752 | err: | 751 | err: |
753 | kfree(codec); | ||
754 | kfree(i2c); | 752 | kfree(i2c); |
755 | return ret; | 753 | return ret; |
756 | } | 754 | } |
@@ -817,6 +815,9 @@ static int uda1380_probe(struct platform_device *pdev) | |||
817 | #else | 815 | #else |
818 | /* Add other interfaces here */ | 816 | /* Add other interfaces here */ |
819 | #endif | 817 | #endif |
818 | |||
819 | if (ret != 0) | ||
820 | kfree(codec); | ||
820 | return ret; | 821 | return ret; |
821 | } | 822 | } |
822 | 823 | ||
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c index 67325fd95447..3d998e6a997e 100644 --- a/sound/soc/codecs/wm8510.c +++ b/sound/soc/codecs/wm8510.c | |||
@@ -693,10 +693,9 @@ static int wm8510_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
693 | client_template.addr = addr; | 693 | client_template.addr = addr; |
694 | 694 | ||
695 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 695 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
696 | if (i2c == NULL) { | 696 | if (i2c == NULL) |
697 | kfree(codec); | ||
698 | return -ENOMEM; | 697 | return -ENOMEM; |
699 | } | 698 | |
700 | i2c_set_clientdata(i2c, codec); | 699 | i2c_set_clientdata(i2c, codec); |
701 | codec->control_data = i2c; | 700 | codec->control_data = i2c; |
702 | 701 | ||
@@ -714,7 +713,6 @@ static int wm8510_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
714 | return ret; | 713 | return ret; |
715 | 714 | ||
716 | err: | 715 | err: |
717 | kfree(codec); | ||
718 | kfree(i2c); | 716 | kfree(i2c); |
719 | return ret; | 717 | return ret; |
720 | } | 718 | } |
@@ -782,6 +780,9 @@ static int wm8510_probe(struct platform_device *pdev) | |||
782 | #else | 780 | #else |
783 | /* Add other interfaces here */ | 781 | /* Add other interfaces here */ |
784 | #endif | 782 | #endif |
783 | |||
784 | if (ret != 0) | ||
785 | kfree(codec); | ||
785 | return ret; | 786 | return ret; |
786 | } | 787 | } |
787 | 788 | ||
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 369d39c3f745..9402fcaf04fa 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -596,10 +596,9 @@ static int wm8731_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
596 | client_template.addr = addr; | 596 | client_template.addr = addr; |
597 | 597 | ||
598 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 598 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
599 | if (i2c == NULL) { | 599 | if (i2c == NULL) |
600 | kfree(codec); | ||
601 | return -ENOMEM; | 600 | return -ENOMEM; |
602 | } | 601 | |
603 | i2c_set_clientdata(i2c, codec); | 602 | i2c_set_clientdata(i2c, codec); |
604 | codec->control_data = i2c; | 603 | codec->control_data = i2c; |
605 | 604 | ||
@@ -617,7 +616,6 @@ static int wm8731_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
617 | return ret; | 616 | return ret; |
618 | 617 | ||
619 | err: | 618 | err: |
620 | kfree(codec); | ||
621 | kfree(i2c); | 619 | kfree(i2c); |
622 | return ret; | 620 | return ret; |
623 | } | 621 | } |
@@ -693,6 +691,11 @@ static int wm8731_probe(struct platform_device *pdev) | |||
693 | #else | 691 | #else |
694 | /* Add other interfaces here */ | 692 | /* Add other interfaces here */ |
695 | #endif | 693 | #endif |
694 | |||
695 | if (ret != 0) { | ||
696 | kfree(codec->private_data); | ||
697 | kfree(codec); | ||
698 | } | ||
696 | return ret; | 699 | return ret; |
697 | } | 700 | } |
698 | 701 | ||
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index c6a8edf302ad..dd1f55404b29 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c | |||
@@ -869,10 +869,9 @@ static int wm8750_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
869 | client_template.addr = addr; | 869 | client_template.addr = addr; |
870 | 870 | ||
871 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 871 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
872 | if (i2c == NULL) { | 872 | if (i2c == NULL) |
873 | kfree(codec); | ||
874 | return -ENOMEM; | 873 | return -ENOMEM; |
875 | } | 874 | |
876 | i2c_set_clientdata(i2c, codec); | 875 | i2c_set_clientdata(i2c, codec); |
877 | codec->control_data = i2c; | 876 | codec->control_data = i2c; |
878 | 877 | ||
@@ -890,7 +889,6 @@ static int wm8750_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
890 | return ret; | 889 | return ret; |
891 | 890 | ||
892 | err: | 891 | err: |
893 | kfree(codec); | ||
894 | kfree(i2c); | 892 | kfree(i2c); |
895 | return ret; | 893 | return ret; |
896 | } | 894 | } |
@@ -966,6 +964,10 @@ static int wm8750_probe(struct platform_device *pdev) | |||
966 | /* Add other interfaces here */ | 964 | /* Add other interfaces here */ |
967 | #endif | 965 | #endif |
968 | 966 | ||
967 | if (ret != 0) { | ||
968 | kfree(codec->private_data); | ||
969 | kfree(codec); | ||
970 | } | ||
969 | return ret; | 971 | return ret; |
970 | } | 972 | } |
971 | 973 | ||
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index dc7b18fd2782..5761164fe16d 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
@@ -1660,10 +1660,9 @@ static int wm8753_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
1660 | client_template.addr = addr; | 1660 | client_template.addr = addr; |
1661 | 1661 | ||
1662 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 1662 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
1663 | if (!i2c) { | 1663 | if (!i2c) |
1664 | kfree(codec); | ||
1665 | return -ENOMEM; | 1664 | return -ENOMEM; |
1666 | } | 1665 | |
1667 | i2c_set_clientdata(i2c, codec); | 1666 | i2c_set_clientdata(i2c, codec); |
1668 | codec->control_data = i2c; | 1667 | codec->control_data = i2c; |
1669 | 1668 | ||
@@ -1682,7 +1681,6 @@ static int wm8753_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
1682 | return ret; | 1681 | return ret; |
1683 | 1682 | ||
1684 | err: | 1683 | err: |
1685 | kfree(codec); | ||
1686 | kfree(i2c); | 1684 | kfree(i2c); |
1687 | return ret; | 1685 | return ret; |
1688 | } | 1686 | } |
@@ -1759,6 +1757,11 @@ static int wm8753_probe(struct platform_device *pdev) | |||
1759 | #else | 1757 | #else |
1760 | /* Add other interfaces here */ | 1758 | /* Add other interfaces here */ |
1761 | #endif | 1759 | #endif |
1760 | |||
1761 | if (ret != 0) { | ||
1762 | kfree(codec->private_data); | ||
1763 | kfree(codec); | ||
1764 | } | ||
1762 | return ret; | 1765 | return ret; |
1763 | } | 1766 | } |
1764 | 1767 | ||
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index e44153fa38de..dd995ef448b4 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -1500,10 +1500,9 @@ static int wm8990_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
1500 | client_template.addr = addr; | 1500 | client_template.addr = addr; |
1501 | 1501 | ||
1502 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); | 1502 | i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); |
1503 | if (i2c == NULL) { | 1503 | if (i2c == NULL) |
1504 | kfree(codec); | ||
1505 | return -ENOMEM; | 1504 | return -ENOMEM; |
1506 | } | 1505 | |
1507 | i2c_set_clientdata(i2c, codec); | 1506 | i2c_set_clientdata(i2c, codec); |
1508 | codec->control_data = i2c; | 1507 | codec->control_data = i2c; |
1509 | 1508 | ||
@@ -1521,7 +1520,6 @@ static int wm8990_codec_probe(struct i2c_adapter *adap, int addr, int kind) | |||
1521 | return ret; | 1520 | return ret; |
1522 | 1521 | ||
1523 | err: | 1522 | err: |
1524 | kfree(codec); | ||
1525 | kfree(i2c); | 1523 | kfree(i2c); |
1526 | return ret; | 1524 | return ret; |
1527 | } | 1525 | } |
@@ -1595,6 +1593,11 @@ static int wm8990_probe(struct platform_device *pdev) | |||
1595 | #else | 1593 | #else |
1596 | /* Add other interfaces here */ | 1594 | /* Add other interfaces here */ |
1597 | #endif | 1595 | #endif |
1596 | |||
1597 | if (ret != 0) { | ||
1598 | kfree(codec->private_data); | ||
1599 | kfree(codec); | ||
1600 | } | ||
1598 | return ret; | 1601 | return ret; |
1599 | } | 1602 | } |
1600 | 1603 | ||
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index 7694621ec40b..87d0ed01f65a 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c | |||
@@ -329,12 +329,14 @@ static int __init n810_soc_init(void) | |||
329 | sys_clkout2_src = clk_get(dev, "sys_clkout2_src"); | 329 | sys_clkout2_src = clk_get(dev, "sys_clkout2_src"); |
330 | if (IS_ERR(sys_clkout2_src)) { | 330 | if (IS_ERR(sys_clkout2_src)) { |
331 | dev_err(dev, "Could not get sys_clkout2_src clock\n"); | 331 | dev_err(dev, "Could not get sys_clkout2_src clock\n"); |
332 | return -ENODEV; | 332 | err = PTR_ERR(sys_clkout2_src); |
333 | goto err2; | ||
333 | } | 334 | } |
334 | sys_clkout2 = clk_get(dev, "sys_clkout2"); | 335 | sys_clkout2 = clk_get(dev, "sys_clkout2"); |
335 | if (IS_ERR(sys_clkout2)) { | 336 | if (IS_ERR(sys_clkout2)) { |
336 | dev_err(dev, "Could not get sys_clkout2\n"); | 337 | dev_err(dev, "Could not get sys_clkout2\n"); |
337 | goto err1; | 338 | err = PTR_ERR(sys_clkout2); |
339 | goto err3; | ||
338 | } | 340 | } |
339 | /* | 341 | /* |
340 | * Configure 12 MHz output on SYS_CLKOUT2. Therefore we must use | 342 | * Configure 12 MHz output on SYS_CLKOUT2. Therefore we must use |
@@ -343,7 +345,8 @@ static int __init n810_soc_init(void) | |||
343 | func96m_clk = clk_get(dev, "func_96m_ck"); | 345 | func96m_clk = clk_get(dev, "func_96m_ck"); |
344 | if (IS_ERR(func96m_clk)) { | 346 | if (IS_ERR(func96m_clk)) { |
345 | dev_err(dev, "Could not get func 96M clock\n"); | 347 | dev_err(dev, "Could not get func 96M clock\n"); |
346 | goto err2; | 348 | err = PTR_ERR(func96m_clk); |
349 | goto err4; | ||
347 | } | 350 | } |
348 | clk_set_parent(sys_clkout2_src, func96m_clk); | 351 | clk_set_parent(sys_clkout2_src, func96m_clk); |
349 | clk_set_rate(sys_clkout2, 12000000); | 352 | clk_set_rate(sys_clkout2, 12000000); |
@@ -356,20 +359,25 @@ static int __init n810_soc_init(void) | |||
356 | gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0); | 359 | gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0); |
357 | 360 | ||
358 | return 0; | 361 | return 0; |
359 | err2: | 362 | err4: |
360 | clk_put(sys_clkout2); | 363 | clk_put(sys_clkout2); |
364 | err3: | ||
365 | clk_put(sys_clkout2_src); | ||
366 | err2: | ||
361 | platform_device_del(n810_snd_device); | 367 | platform_device_del(n810_snd_device); |
362 | err1: | 368 | err1: |
363 | platform_device_put(n810_snd_device); | 369 | platform_device_put(n810_snd_device); |
364 | 370 | ||
365 | return err; | 371 | return err; |
366 | |||
367 | } | 372 | } |
368 | 373 | ||
369 | static void __exit n810_soc_exit(void) | 374 | static void __exit n810_soc_exit(void) |
370 | { | 375 | { |
371 | gpio_free(N810_SPEAKER_AMP_GPIO); | 376 | gpio_free(N810_SPEAKER_AMP_GPIO); |
372 | gpio_free(N810_HEADSET_AMP_GPIO); | 377 | gpio_free(N810_HEADSET_AMP_GPIO); |
378 | clk_put(sys_clkout2_src); | ||
379 | clk_put(sys_clkout2); | ||
380 | clk_put(func96m_clk); | ||
373 | 381 | ||
374 | platform_device_unregister(n810_snd_device); | 382 | platform_device_unregister(n810_snd_device); |
375 | } | 383 | } |
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c index 8548818eea08..c796b1882776 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/platform_device.h> | ||
19 | #include <sound/core.h> | 20 | #include <sound/core.h> |
20 | #include <sound/pcm.h> | 21 | #include <sound/pcm.h> |
21 | #include <sound/initval.h> | 22 | #include <sound/initval.h> |
@@ -81,7 +82,6 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream) | |||
81 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 82 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
82 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 83 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; |
83 | 84 | ||
84 | clk_i2s = clk_get(NULL, "I2SCLK"); | ||
85 | if (IS_ERR(clk_i2s)) | 85 | if (IS_ERR(clk_i2s)) |
86 | return PTR_ERR(clk_i2s); | 86 | return PTR_ERR(clk_i2s); |
87 | 87 | ||
@@ -152,6 +152,7 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream, | |||
152 | pxa_gpio_mode(gpio_bus[pxa_i2s.master].tx); | 152 | pxa_gpio_mode(gpio_bus[pxa_i2s.master].tx); |
153 | pxa_gpio_mode(gpio_bus[pxa_i2s.master].frm); | 153 | pxa_gpio_mode(gpio_bus[pxa_i2s.master].frm); |
154 | pxa_gpio_mode(gpio_bus[pxa_i2s.master].clk); | 154 | pxa_gpio_mode(gpio_bus[pxa_i2s.master].clk); |
155 | BUG_ON(IS_ERR(clk_i2s)); | ||
155 | clk_enable(clk_i2s); | 156 | clk_enable(clk_i2s); |
156 | pxa_i2s_wait(); | 157 | pxa_i2s_wait(); |
157 | 158 | ||
@@ -317,6 +318,43 @@ struct snd_soc_dai pxa_i2s_dai = { | |||
317 | 318 | ||
318 | EXPORT_SYMBOL_GPL(pxa_i2s_dai); | 319 | EXPORT_SYMBOL_GPL(pxa_i2s_dai); |
319 | 320 | ||
321 | static int pxa2xx_i2s_probe(struct platform_device *dev) | ||
322 | { | ||
323 | clk_i2s = clk_get(&dev->dev, "I2SCLK"); | ||
324 | return IS_ERR(clk_i2s) ? PTR_ERR(clk_i2s) : 0; | ||
325 | } | ||
326 | |||
327 | static int __devexit pxa2xx_i2s_remove(struct platform_device *dev) | ||
328 | { | ||
329 | clk_put(clk_i2s); | ||
330 | clk_i2s = ERR_PTR(-ENOENT); | ||
331 | return 0; | ||
332 | } | ||
333 | |||
334 | static struct platform_driver pxa2xx_i2s_driver = { | ||
335 | .probe = pxa2xx_i2s_probe, | ||
336 | .remove = __devexit_p(pxa2xx_i2s_remove), | ||
337 | |||
338 | .driver = { | ||
339 | .name = "pxa2xx-i2s", | ||
340 | .owner = THIS_MODULE, | ||
341 | }, | ||
342 | }; | ||
343 | |||
344 | static int __init pxa2xx_i2s_init(void) | ||
345 | { | ||
346 | clk_i2s = ERR_PTR(-ENOENT); | ||
347 | return platform_driver_register(&pxa2xx_i2s_driver); | ||
348 | } | ||
349 | |||
350 | static void __exit pxa2xx_i2s_exit(void) | ||
351 | { | ||
352 | platform_driver_unregister(&pxa2xx_i2s_driver); | ||
353 | } | ||
354 | |||
355 | module_init(pxa2xx_i2s_init); | ||
356 | module_exit(pxa2xx_i2s_exit); | ||
357 | |||
320 | /* Module information */ | 358 | /* Module information */ |
321 | MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com"); | 359 | MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com"); |
322 | MODULE_DESCRIPTION("pxa2xx I2S SoC Interface"); | 360 | MODULE_DESCRIPTION("pxa2xx I2S SoC Interface"); |